-
Notifications
You must be signed in to change notification settings - Fork 375
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
Dynamic runtime compilation with custom classes #73
Comments
Thanks for your report and for creating the issue :) It should definitely work (see also some tests here: https://github.com/jOOQ/jOOR/blob/master/jOOR/src/test/java/org/joor/test/CompileTest.java), but is the |
Can you create a test case to help reproduce this? |
You can reproduce it with this repo: https://github.com/joanbonilla/dynamic-compiler Run it with |
I see, thanks for the test case. Very interesting. When I run the class in Eclipse, it works. It doesn't work from whatever the |
Does this issue fix it? #65 |
Tried it myself. #65 doesn't seem to fix it |
I solved the issue with some tips in your library about the classloader, I needed to use the current Classloader |
Do you want the code I just implemented in a new branch? |
Is that it? The solution would be something similar, but the |
Are you using CompileOptions as context pattern object? |
I don't know what a "context pattern object" is |
I did another branch: |
Thanks. I've had a look at this when taking an attempt at implementing #72. Your code will affect the JDK 8 distribution, but what about JDK 9+? How can we define a class on an existing class loader when we're no longer allowed to "open up" the |
Hi,
I have a spring boot application with some custom code and I've tried to compile that sample with a custom class inside.
Can I compile dynamic classes with my custom code?
Expected behavior and actual behavior:
Expected: show the "Hello World!" message
Actual:
I get the next error (classloader):
Steps to reproduce the problem:
Create package
com.sample.spring
and create Java class in this package namedWebsitesBO
Copy the next code and run it:
Versions:
Thank you
The text was updated successfully, but these errors were encountered: