In Eclipse Java, while developing a Java Project, I can easily use these methods to compile external Java files:
JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
compiler.run(null, null, null, javaNamesArray);
However, the exact same thing in Eclipse DSL, in an Xtext Project, isn't working because the JavaCompiler object doesn't find the JARs (which are in the classpath) nor the class binaries from my own project. In order to be able to compile, I have to export the classes I need and tell the compiler where they are as well as the JARs.
Why is the compiler behavior so different in an Xtext project? What am I missing?
ps: then, when loading the classes, the problem repeats itself
Aucun commentaire:
Enregistrer un commentaire