I am currently using Gradle 3.0, which supports JDK 9. I tried to download JDK 9 from Oracle's official website but you need an account for the archived versions (they require a company name and a work phone, none of which I can provide). My version of JDK is 15.0.1. As far as I know, the latest version of Gradle supports it. However, I'm not sure how to update Gradle in my workspace. Would updating it cause any errors since it's a huge gap between the versions?
For reference, the older version of Gradle came with the mod developer kit of the forge. I am currently working on the 1.8.9 version of Minecraft. I am using IntelliJ, not Eclipse. I apologize if I didn't structure my question properly.
IntelliJ IDEA has JDK downloader that offers multiple JDK versions/vendors. You can use JDK 1.8 for Gradle 3.0 or JDK 11 for Gradle 5.0+:
Just Install sdkman.io
Then upgrading the Gradle/maven/jdk and many other JVM project is as easy as running a command.
You can also switch between versions in a very convenient way.
Related
I've spent too much time trying to find how to do this with. Tips for setting up a dev environment are what I am asking for, however I will start with what I tried so far.
As I understand JavaFX was separated from the JDK after JDK 8, however, for an R&D project, I need to create JavaFX applications that can be built and compiled in Java 11. Normally installing the e(fx)clipse plugins into Eclipse will not work unless a Java 8 installation is pointed to.
So, I have been following this guide: https://gist.github.com/stevenliebregt/bc62a382fc43064136b662ee62172ab3
JavaFX 11 is on LTS from Gluon, it seems, meaning I'd have to pay at least $900 to get it.
So instead, I tried building OpenJFX using following the instructions at this link:
https://wiki.openjdk.org/display/OpenJFX/Building+OpenJFX
When I start the build with Gradle, it fails because the minimum supported version for Java to build this is apparently 17.
Any suggestions for building JavaFX projects with JDK 11 is greatly appreciated.
The LTS version is JavaFX 11.0.16. You can download non-LTS 11.x versions from GluonHQ by checking the "include older versions" checkbox on the download page.
Once you clicked it, you see all versions starting with 11 until 20-ea+1, even the obsolete ones.
Your best choice is probably 11.0.2
And to add something you didn't ask for: JDK 11 is compatible with the latest versions of JavaFX, even JavaFX 18, as you can see in the Release Notes:
"As of JDK 11 the JavaFX modules are delivered separately from the
JDK. These release notes cover the standalone JavaFX 18 release.
JavaFX 18 requires JDK 11 or later."
(I emphasized the last part of the quote)
Thanks all, for the good information. I found that the best way to handle this way to build in IntelliJ instead. I can build and run JavaFX 18 easily with JDK 11.
On the main page I noticed that JJWT is supposed to run on all JDK, which - since our project for all sorts of reasons is still stuck on v1.6 - sounded great.
With the last version maven retrieves however, the class version is not compatible.
And afterwards in the build wiki I noticed it specifies version 7.
Anyone have a clue what does run on v1.6.
Can I use an older version, or should I compile it myself maybe.
On the main page I noticed that JJWT is supposed to run on all JDK ...
That is definitely incorrect / inaccurate. The initial commits for the JJWT project were for JDK 1.6. And I can see that the code uses generics, so compiling / running for earlier than JDK 1.5 will be impossible.
The POM.xml file for the latest version of the project sets the source and target version for the project to JDK 1.7. So certainly the artifacts that a standard build will generate now will NOT run on a Java 6 platform. The class file version will be too recent for a Java 6 JVM to understand.
Now you could try changing the JDK level to 1.6 in the POM file in the HEAD version. However, the JDK version for JJWT was bumped past 1.6 four years ago, so there are liable to be build issues if you wind back. (The developers could have introduced Java 7+ dependencies; e.g. using try with resources syntax or Java 7+ APIs.)
A better idea would be to use an old version of JJWT. You should be able to figure out what version you need to use (or build) for JDK 1.6 compatibility by looking at the project's git history on Github. Look at the relevant changes to the POM file and when they happened. I think it is version 0.9.0 or thereabouts.
Of course a better solution would be "unstick" your project. JDK 1.6 is 8 years past its end of life, and 3 years past the end of Oracle's JDK 1.6 (paid) extended support.
I have Spring Tool Suite 3.6.1, which is based on Eclipse 4.4.
I installed the version of Grails I need, but I noticed that the Groovy compiler is at 2.3, whereas I need it to be at 1.8.
I've gone to dist.springsource.org on the Eclipse Marketplace to look for the Compiler 1.8. I can install it, but it automatically uninstalls the existing Grails IDE. On top of that, it doesn't appear under Preferences - Groovy - Compiler and I don't seem to be able to select it.
What am I doing wrong? Do I need to use an earlier version of the Spring Tool Suite to access this particular compiler?
I'd recommend using the snapshot update site to get the latest groovy-eclipse: http://dist.springsource.org/snapshot/GRECLIPSE/e4.4/
That includes the 1.8 compiler and the latest groovy-eclipse 2.9.1 builds that work with it - the 2.9.0 release had trouble with groovy 1.8. (But 1.8 is getting quite old now so we may drop support in the not too distant future).
That snapshot build should also be compatible with grails-ide, not sure why it would be uninstalling grails-ide (but remember that grails-ide is different to the grails-runtime - have you definitely installed both from the dashboard extensions page or just the runtime?)
I am new to the team city as it is being used in our development environment and I have gone through its official website and to know more about it , but now my query is that I am stuck up in an very odd situation that is my project is in java and it uses jdk 1.5 and ant 1.5 now due to certain restrictions i can not upgrade my project to jdk 1.5 and 1.5 so i have to use jdk 1.5 only and similar case with ant also , now I have to onboard my project onto teamcity version 7 , but I have found that team city 7 minimum requirement is that you should have jdk 1.6 at least and ant version 1.8 at least which i do not have now please advise in such situation how can i set up or on board my project in teamcity.
TeamCity is itself written in Java, and so it requires JDK 1.6. However, that doesn't stop you also installing JDK1.5 as well as JDK1.6 on your TeamCity server and using Java 1.5 to build your project. (Our TeamCity server has JDK 1.6 and 1.7 installed on it and doesn't have a problem with that.)
I also can't see a problem with the Ant versions. TeamCity 7 ships with Ant 1.8.2, but that doesn't stop you using Ant 1.5. I haven't found a way to tell TeamCity to use an alternative version of Ant, but you can always use the command-line runner to run the correct version of Ant if you really need to.
I just read How to have Eclipse use JDK8 to compile a project?
What i added jdk8 to eclipse as,
From the answers of How to have Eclipse use JDK8 to compile a project?
I tried to Update the JDT/Core, JDT/UI bundles from http://dist.springsource.com/snapshot/TOOLS/java8/e43
But it shows error as,
"Eclipse Java Development Tools Patch for Java 8 Support (BETA)" is not applicable to the current configuration and will not be installed.
"Eclipse Plug-in Development Environment Patch for Java 8 Support (BETA)" is not applicable to the current configuration and will not be installed.
How Can i fix it ?
I can say that Java 1.8 does in fact work with Eclipse Luna ( the beta version released around March 17, 2014) or later. I tried it and it was good.
Also, I noticed that in the Eclipse Marketplace, there are now plugins to install functionality into Kepler to support JDK1.8. I haven't tried the plugin myself though.
This is a old topic but I just wanted to point out that I have searched enough to find that Indigo version can't be updated to S.E 1.8 here the link which is given on eclipse website to update the Execution Environment but if you try it will throw error for Indigo.
Here is the link where the Information about execution environment is given.
This shows the step by step to update Execution environment.
I have tried to update Execution environment and I got the same error.