eclipse photon and jdk 17
posted 10 months ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
I found I can't start eclipse photon using jdk 17 (specified in eclipse .ini). However, photon can be started using jdk 8. I don't see docu saying eclipse photon can't be started using jdk 17. Does anybody know ?
posted 10 months ago
What error messages do you get? To see error messages, open a command prompt window in the folder with the eclipse command and enter the eclipse command.
What is the content of your ini file?
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
I can't start eclipse photon using jdk 17
What error messages do you get? To see error messages, open a command prompt window in the folder with the eclipse command and enter the eclipse command.
jdk 17 (specified in eclipse .ini).
What is the content of your ini file?
Linwood Hayes
Ranch Hand
Posts: 178
posted 10 months ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Well, before I figure out what exactly going on. I would like to clarify something here to help me understand basics (sorry):
1. I add "-vm ...\jdk1.17(8/11)\jre\..javaw.exe" i eclipse.ini file to specify which jdk version eclipse uses. Question: suppose I don't create this "-vm ..." line in .ini file, what is the default jdk eclipse uses ?
2. I found that once I open eclipse workspace, windows-->preference-->added jre, i can add multiple jdk that i have installed and specify one at a time. Question: the jre I specified in this windows-->preference-->java-->added jre will override the "-vm ..." in .ini file, or the other way ?
Thanks!
1. I add "-vm ...\jdk1.17(8/11)\jre\..javaw.exe" i eclipse.ini file to specify which jdk version eclipse uses. Question: suppose I don't create this "-vm ..." line in .ini file, what is the default jdk eclipse uses ?
2. I found that once I open eclipse workspace, windows-->preference-->added jre, i can add multiple jdk that i have installed and specify one at a time. Question: the jre I specified in this windows-->preference-->java-->added jre will override the "-vm ..." in .ini file, or the other way ?
Thanks!
posted 10 months ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Eclipse runs under a particular JVM which is specified in that .ini file. You probably don't need to change that.
When you create a Java project in Eclipse, you can specify what JVM that project uses. You can download any JVM you like from the web and have that project use it. You can do that for every project, although there's a default JVM if you don't choose one. You can specify what that default you should be, too. But none of this affects the JVM under which Eclipse runs.
I don't know what the default JVM for Eclipse Photon is, but since that Eclipse version is 6 or 7 years old now I wouldn't be surprised if it's Java 8. Although as I said earlier, it doesn't matter. If you want to have your project use Java 17, then download Java 17 and put it somewhere on your disk. Then find "Installed JREs" in the Java configuration and add the Java 17 JRE to its list.
Although it might be better to get a newer version of Eclipse, don't you think?
When you create a Java project in Eclipse, you can specify what JVM that project uses. You can download any JVM you like from the web and have that project use it. You can do that for every project, although there's a default JVM if you don't choose one. You can specify what that default you should be, too. But none of this affects the JVM under which Eclipse runs.
I don't know what the default JVM for Eclipse Photon is, but since that Eclipse version is 6 or 7 years old now I wouldn't be surprised if it's Java 8. Although as I said earlier, it doesn't matter. If you want to have your project use Java 17, then download Java 17 and put it somewhere on your disk. Then find "Installed JREs" in the Java configuration and add the Java 17 JRE to its list.
Although it might be better to get a newer version of Eclipse, don't you think?
Linwood Hayes
Ranch Hand
Posts: 178
posted 10 months ago
-
1 -
-
Number of slices to send:Optional 'thank-you' note:
-
-
Thank you. I confirm that my project inside my workspace is using the JDK I specified using "windows->preference->java->jre added" instead of the jdk I specified in the eclpise.ini file. Probably the eclipse starts with the JVM specified in eclipse .ini file, but apparently when it comes to each project and workspace it uses whatever I specified JRE. Thanks all.
posted 10 months ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Recent Eclipse releases DEMAND that you run it under Java 21. I had a lot of grief with that until I tracked down the requisite place to update (the eclipse.ini file) as the Eclipse upgrade process didn't fix that automatically.
As has been noted above, the JDK that runs Eclipse itself has no particular bearing on what JDK builds and runs any particular project and in fact, every individual project can select to use any JDK that has been registered in the Eclipse IDE.
As has been noted above, the JDK that runs Eclipse itself has no particular bearing on what JDK builds and runs any particular project and in fact, every individual project can select to use any JDK that has been registered in the Eclipse IDE.
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
| It's feeding time! Give me the food you were going to give to this tiny ad: The new gardening playing cards kickstarter is now live! https://www.kickstarter.com/projects/paulwheaton/garden-cards |











