A little know feature of the Eclipse's Java compiler is that you can run it from the command line.
This works well (after patching plexus-compiler to use the latest release).
My problem: The stack traces are different when I compile the code from the command line. For example, when I run the compiler in the IDE, I get this output:
at com.some.Foo.method(Foo.java:312)
but when I compile the code from the command line, I get this:
at com.some.Foo.method(com.some.Foo:312)
^^^^^^^^^^^^
What's going here???
Analyzing the class files with javap
gives:
SourceFile: "Foo.java"
and
SourceFile: "com.some.Foo"
Any ideas what might cause this?
$ cat baz/Bar.java
class Foo {
}
$ java -jar eclipse/plugins/org.eclipse.jdt.core_3.8.0.v_C19.jar baz/Bar.java
$ javap -c baz/Foo.class
Compiled from "Bar.java"
...
That's Funny, It Works On My Machine?
Win7, Java 7, Eclipse 3.8.0 (identifies itself as Indigo, 20110615-0604).
This seems to have been fixed in plexus-compiler-eclipse version 1.9.1 (or maybe some other version between 1.9.1 and 1.7)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With