Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IllegalAccessException on multiple invocations #86

Open
jimbru opened this issue Oct 16, 2014 · 2 comments
Open

IllegalAccessException on multiple invocations #86

jimbru opened this issue Oct 16, 2014 · 2 comments

Comments

@jimbru
Copy link

jimbru commented Oct 16, 2014

Executing a simple Hello World program fails with IllegalAccessException on subsequent runs.

  1. Create simple HelloWorld.java file:
class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello Drip");
    }
}
  1. Compile it: javac HelloWorld.java.
  2. Run it with Drip: drip -cp . HelloWorld.
  3. Repeat step 3, see exception.

Paste of console output:

ip-10-1-10-16:java jim$ drip -cp . HelloWorld
Hello Drip
ip-10-1-10-16:java jim$ drip -cp . HelloWorld
Exception in thread "main" java.lang.IllegalAccessException: Class org.flatland.drip.Main can not access a member of class HelloWorld with modifiers "public static"
    at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:101)
    at java.lang.reflect.AccessibleObject.slowCheckMemberAccess(AccessibleObject.java:295)
    at java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:287)
    at java.lang.reflect.Method.invoke(Method.java:476)
    at org.flatland.drip.Main.invoke(Main.java:117)
    at org.flatland.drip.Main.start(Main.java:88)
    at org.flatland.drip.Main.main(Main.java:64)

Java v1.8.0_25

@OLFDB
Copy link

OLFDB commented Feb 7, 2016

Did you try it using public class HelloWorld { ?

@jimbru
Copy link
Author

jimbru commented Feb 10, 2016

@OLFDB It's been 6 months...but I probably didn't. Can that explain why it works on the first invocation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants