How to use Java Compiler API inside a deployment on JBoss
Issue
I am trying to compile code at runtime inside JBoss EAP, using javax.tools.JavaCompiler. I need to add libraries from my EAR to the classpath of the compiler, but that fails because they have vfs: URLs. How can I make it work?
Environment
- JBoss Enterprise Application Platform (EAP) 6
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.