Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is the latest version of antlr4 compatible with jdk8 jar? #4203

Open
melin opened this issue Mar 23, 2023 · 8 comments
Open

Is the latest version of antlr4 compatible with jdk8 jar? #4203

melin opened this issue Mar 23, 2023 · 8 comments

Comments

@melin
Copy link

melin commented Mar 23, 2023

Many big data components depend on antlr4. For example: spark, antlr4 cannot be upgraded to the latest version for compatibility with jdk8.

grammars-v4 some grammars in 4.10 later, unable to upgrade the JDK version, lead to cannot use: for example: https://github.com/antlr/grammars-v4/commits/master/sql/tsql/

Is the latest version of antlr4 compatible with jdk8 jar?

@ericvergnaud
Copy link
Contributor

Antlr runtime is compatible with jdk8. Antlr tool requires jdk11. Can you provide a concrete example of this Spark incompatibility (stack trace) ?

@melin
Copy link
Author

melin commented Mar 23, 2023

jdk switch to 11, ready to compile. Thanks!
jdk8 is used a lot, which is not very convenient,For example, spark antlr4 can only be upgraded to 4.9.3
apache/spark#37814

@LuciferYang
Copy link

Antlr runtime is compatible with jdk8. Antlr tool requires jdk11. Can you provide a concrete example of this Spark incompatibility (stack trace) ?

Do you mean we can using Java 11 and Antlr tool to generate java file from .g4 file, and then using Java 8+Antlr runtime to use java file at runtime?

@melin
Copy link
Author

melin commented Mar 23, 2023

Antlr runtime is compatible with jdk8. Antlr tool requires jdk11. Can you provide a concrete example of this Spark incompatibility (stack trace) ?

Do you mean we can using Java 11 and Antlr tool to generate java file from .g4 file, and then using Java 8+Antlr runtime to use java file at runtime?

Yes

@ericvergnaud
Copy link
Contributor

ericvergnaud commented Mar 23, 2023 via email

@melin
Copy link
Author

melin commented Mar 25, 2023

Why does Antlr tool need at least jdk11? This requires that mvn requires jdk11 to run

@ericvergnaud
Copy link
Contributor

ericvergnaud commented Mar 25, 2023 via email

@ericvergnaud
Copy link
Contributor

ericvergnaud commented Mar 26, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants