Skip to content

JavaMemoryCompiler.Compilation.Exception: "package xxx does not exist" #31

Answered by Roberto-Gentili
YugenDesu asked this question in Q&A
Discussion options

You must be logged in to vote

It is not possible to detect all classpaths of all classloaders in the world. However, if you only need these classes of dependency for compilation and your classloader detects them you don't have to worry: after compilation when loading the compiled class, already loaded classes will not be loaded twice by your classloader.

Remeber also that the addClassRepository method works also on .war and .ear archive and will automatically detect classpaths, so you just need to pass it the paths to these files.

... Also the method addClassPaths works on .war and .ear files but you must indicate the base folder of your classes in the .war and .ear files, e.g.: "../../your-war-application.war/WEB-INF…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by YugenDesu
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #30 on October 23, 2023 11:02.