A really great option is to use async-profiler as a Java agent (like the hprof example above, but with a much smaller effect on the performance of the application).
You can download it here. Then you pass the path to the profiler shared library when you launch your program:
java -agentpath:/path/to/libasyncProfiler.so=start,svg,file=profile.svg DimacsSuite
This will produce an interactive SVG that you can open in your browser. You can also use this approach with the IntelliJ launch configuration or the SBT configuration @sangamon posted.
Note that the error you pasted above is because you have provided no class path to the java process so it does not know where to find the class DimacsSuite. The class name should be fully qualified too (e.g. if it’s in package dimacs, then dimacs.DimacsSuite).
java -agentpath:/path/to/libasyncProfiler.so=start,svg,file=profile.svg -cp /path/to/classfiles dimacs.DimacsSuite
If you get IntelliJ Ultimate it will do all of this setup for you.