I looking for a way to inspect the generated bytecode which easily integrates into either SBT or the Eclipse Scala IDE.
I guess the default approach would be to:
console
in SBT:javap -c ClassToAnalyze
However, I'm working on JVM version 1.7 (Scala version 2.10.0) and I simply get:
:javap not yet working with java 1.7
Are there any alternatives to inspect/analyze the generated bytecode?
Both the following work for me with java 1.7
:javap
in the Scala 2.11 REPLjavap
tool of the Java 1.7 JDKNow, to integrate that with SBT or Eclipse, you could make use of the JDK's javap
in the same way as any other executable compatible with the command-line.
EDIT running external commands is not cross-platform of course, but in the case of SBT "scripts" you can refer to: