I have a program that compiles a Java class.
JavaCompiler.CompilationTask compilationTask = compiler.getTask(null, fileManager, diagListener, compilerOptions, null, Arrays.asList(compilationUnit));
compilationTask.call;
In compilerOptions, classpath is being set with -classpath
I need to modify this by adding wildchar in the classpath so that it will add all jar files from the directory.
I tried the following values for being used for the -classpath flag, but all fails.
"one.jar:two.jar:/data/third_party/*:"
"one.jar:two.jar:/data/third_party/*"
"\"one.jar:two.jar:/data/third_party/*\""
Is there a way to make this work?
Edit: This is not about the options we set from the command line. I am aware of existing questions on that.