[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[jdt-core-dev] Is Java 9 modularity supported in AST standalone parser?
|
Hi,
I am trying to setup standalone parser to compile java 9 module based project, but I failed.
No matter how I setup the environment it looks like parser does not see files in context of modules and I got compile errors.
here is the simple example, I have a project with structure:
main
....src
........main
module main {
exports main;
}
package main;
public class Main {
public static void main(String[] args)
{
}
}
I compile both of those files using
ASTParser.createASTs() method. Main.java compiles fine, but for module-info.java i always got following compile error:
"The package main does not exist or is empty"
My question is how to configure environment to make it pass?
Do you know maybe any example/unit test for similar case? I will be very grateful for that.
Or maybe there should be other question raised: is Java 9 modularity supported in AST standalone parser?
This is very simple example. If I am using two or modules it looks like parser is not able to recognize other modules on classpath. So if use 'requires' directive in module-info.java refering to some other module parser throws an compile error if this module in on classpath/sourcepath.
Best Regards,
Robert