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
Reflect.compile(name,content) import static org.joor.Reflect.* gives compilation error, and import org.joor.Reflect that the compiler tells me to use throw exception #91
Comments
Thanks for your report. Can you please provide a complete example including your own source code that helps reproduce this problem? |
I tried to use my own input for the Reflect.compile() but I got an error so I used your input (the one you were providing in the git) but still got the same error. I can send you my all code if needed.
This is the import I'm using: import org.joor.Reflect; |
I'm not sure if I understand it. The code example you've shown does not import I'll try reproducing this, but I'm still curious why you'd say that this has anything to do with your static import... |
I'm not sure as well whats going on. Its my first time trying to use a static import. so maybe your code actually fine and I just dont understand what I should do with that. So, I used your import but is says I have compilation error on the Reflect, and tells me I should use another import. If I use your static import I will have a compilation error but when I use the other import I have an error (NullPointerException). if you want I can send you the link to my project on git and you will take a look if it helps. |
Code always beats prose, so yes please :) Or even better, if possible, you could fork this project, add a unit test that reproduces the problem, and send a PR with the failing test. In any case, think about it this way. If I can reproduce the problem on my machine, then I will be able to fix it right away. If I cannot reproduce this, I cannot really help you very well. |
This is a different problem, but I cannot reproduce it either.
I'm closing this issue as it does not seem to describe any problems in jOOR, but rather general Java classpath setup problems. |
HI , i am facing the same issue , can you help me out for android ? thank you |
@ganatrajay Thanks for your message. Can you please open a new issue with details on how to reproduce your problem? |
@ganatrajay I'm sorry, I overlooked you were using android. See my answer here: #102 (comment) |
Expected behavior and actual behavior:
print hellow world to console
Steps to reproduce the problem:
I follower your instructions, added Dependency and imported static org.joor.Reflect.*, but I got a compilation error.
so I used the suggestion eclipse gave me to import org.joor.Reflect.
compile method didn't excised so I changed the dependency version to 0.9.12, and I run my code.
Versions:
0.9.12
Error message:
Exception in thread "Thread-1" org.joor.ReflectException: Error while compiling com.example.HelloWorld
at org.joor.Compile.compile(Compile.java:156)
at org.joor.Reflect.compile(Reflect.java:102)
at org.joor.Reflect.compile(Reflect.java:77)
at server.Server.compileFile(Server.java:397)
at server.OurThreadClass.handleRequest(OurThreadClass.java:215)
at server.OurThreadClass.handleConnection(OurThreadClass.java:111)
at server.OurThreadClass.run(OurThreadClass.java:72)
Caused by: java.lang.NullPointerException
at org.joor.Compile.compile(Compile.java:64)
... 6 more
The text was updated successfully, but these errors were encountered: