• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

eclipse photon and jdk 17

 
Ranch Hand
Posts: 178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ?
 
Master Rancher
Posts: 5112
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Sheriff
Posts: 28371
99
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Linwood Hayes
Ranch Hand
Posts: 178
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Saloon Keeper
Posts: 28486
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic