Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-core-dev] Odp: Re: Is Java 9 modularity supported in AST standalone parser?

Hi ,

Thanks Manoj for your answer.
I've added comment to this PR along with the reproducible example.
Could you please reopen it? It looks like I have no permission to do that.

Best Regards,
Robert

Dnia 23 sierpnia 2018 10:15 Manoj Palat <manoj.palat@xxxxxxxxxx> napisaƂ(a):

Hi,
Please use the parser options as described and see if you are able to parse. If not please reopen that bug with a reproducible test case.

Regards,
Manoj

Inactive hide details for 'unogs@xxxxx' ---08/23/2018 01:24:51 PM---Hi,   I am trying to setup standalone parser to compile jav"unogs@xxxxx" ---08/23/2018 01:24:51 PM---Hi, I am trying to setup standalone parser to compile java 9 module based project, but I failed.

From: "unogs@xxxxx" <unogs@xxxxx>
To: "jdt-core-dev@xxxxxxxxxxx" <jdt-core-dev@xxxxxxxxxxx>
Date: 08/23/2018 01:24 PM
Subject: [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
............Main.java

and here is the content of module-info.java file
module main {
exports main;
}

and Main.java file

package main;

public class Main {
public static void main(String[] args)
{
System.out.println("hello world!");
}
}

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.

There is also at least one problem that AST standalone parser is not aware of module-info.class which I reported in https://bugs.eclipse.org/bugs/show_bug.cgi?id=538037

Best Regards,
Robert_______________________________________________
jdt-core-dev mailing list
jdt-core-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jdt-core-dev

_______________________________________________
jdt-core-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit


Back to the top