Giter Club home page Giter Club logo

Comments (13)

zbynek avatar zbynek commented on August 15, 2024 3

You can run the compiler with JDK 17, but you cannot use Java 17 language features. Those will be added in GWT 2.12 and the progress is tracked here: #9869

from gwt.

jnehlmeier avatar jnehlmeier commented on August 15, 2024 3

Since source level 17 is not available with gwt 2.11.0 and AFAIK if you do not set a value it should resolve to source level 1.8, you're left with one choice....
For what is worth in my configs I am setting the source level to 11
PS: but I do see your point

Do you mean, it won't support java17 compiler? Our project is upgrading to java17 so, all its modules should be compiled by 17 only. I just want to make sure why it's not allowing to compile in "17" even though it was mentioned in GWT release document.

You can use JDK 17 to compile your project and also use it to start the GWT compiler. The sourceLevel argument defines which Java language features the GWT compiler will accept while compiling your Java code to JavaScript. That is independent of the JVM you are using to compile your app and run the GWT compiler.

from gwt.

bpetridean avatar bpetridean commented on August 15, 2024 1

Note: I don't want to pass -sourceLevel 11 argument to compile on 17

Why not?

from gwt.

jnehlmeier avatar jnehlmeier commented on August 15, 2024 1

Closing the issue because -sourceLevel 17 is expected to fail with GWT 2.11 as GWT only understands language features up to Java 11.

from gwt.

jnehlmeier avatar jnehlmeier commented on August 15, 2024

What is the actual error?

from gwt.

Dejiva avatar Dejiva commented on August 15, 2024

Error is getting as below then stops the compilation.
Source level must be one of [auto, 1.8, 9, 10, 11].
Google Web Toolkit 2.11.0

image

from gwt.

bpetridean avatar bpetridean commented on August 15, 2024

btw: are u using GIN?

from gwt.

Dejiva avatar Dejiva commented on August 15, 2024

btw: are u using GIN?

No

from gwt.

Dejiva avatar Dejiva commented on August 15, 2024

Note: I don't want to pass -sourceLevel 11 argument to compile on 17

Why not?

Don't want to bypass the java17 compiler.

from gwt.

bpetridean avatar bpetridean commented on August 15, 2024

Since source level 17 is not available with gwt 2.11.0 and AFAIK if you do not set a value it should resolve to source level 1.8, you're left with one choice....

For what is worth in my configs I am setting the source level to 11
According to @niloc132 in order to get the new lang features you'll have to set source level to either auto or 11

PS: but I do see your point

from gwt.

Dejiva avatar Dejiva commented on August 15, 2024

Since source level 17 is not available with gwt 2.11.0 and AFAIK if you do not set a value it should resolve to source level 1.8, you're left with one choice....

For what is worth in my configs I am setting the source level to 11

PS: but I do see your point

Do you mean, it won't support java17 compiler?
Our project is upgrading to java17 so, all its modules should be compiled by 17 only.
I just want to make sure why it's not allowing to compile in "17" even though it was mentioned in GWT release document.

from gwt.

bpetridean avatar bpetridean commented on August 15, 2024

Also see this gitter thread

from gwt.

Dejiva avatar Dejiva commented on August 15, 2024

Thank you all for your support and quick response.

from gwt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.