Community
Participate
Working Groups
Compile the 2 attached files in Eclipse, and run p2.test2 from the command line with the -Xfuture option. You will get this exception: Exception in thread "main" java.lang.IllegalAccessError: tried to access method p1.test1.doit()V from class p2.test2$1 at p2.test2$1.bar(test2.java:9) at p2.test2.foo(test2.java:11) at p2.test2.main(test2.java:17) Eclipse does not seem to generate an accessor from p2.test2 to p1.test1, like Sun's javac does. Note: I am using -Xfuture not because I want to be paranoid, but because I have this problem when this code runs inside a Web application. The VM for the app. server is not started with -Xfuture, so I just assume that the VM is more strict when the code is loaded through a class loader.
Created attachment 9517 [details] Test classes
Which version of Eclipse are you using ? Cannot reproduce in latest 3.0.
Actually, I was able to reproduce it. I had forgot to specify '-verify' on command line.
Problem comes from the fact we did not perform emulation for static targets (fields or methods). Fixed, added regression test InnerEmulationTest#test115
Thanks for fixing this so quickly!
Verified in 200405180816