• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Multiple Eclipse icons?

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hope I'm in correct forum section...

Is it possible to have multiple Eclipse icons? My goal is to have two Eclipse icons, one which will be associated with workspace(s) for developing Java EE apps, and the other one for Java GUI,Desktop apps, that is SE.

Is there any way on how to achieve this? TA told us to install JDK 1.8 (since we'll be working with Apache Tomcat "some version") and we need to have that one installed. However, I want for my side projects (and for practicing purposes) to use jdk 1.12. Also, I want in that workspace, (which will be use for side projects), to be able to switch between different jdks. That is, to be able to use "Build path" option in Eclipse, and to choose for different projects to develop them either in jdk 1.8 or jdk 1.12. For now, my JAVA_HOME variable is set to be C:\Program Files\Java\jdk1.8.0_221.

Also, when I type in cmd where java I get:
C:\Program Files\Java\jdk1.8.0_221\bin\java.exe
C:\Program Files\Java\jdk-12.0.2\bin\java.exe


I tried to install two Eclipse packages, one for Java SE and one for Java EE. That didn't go well. I got some message when I tried to open Eclipse for Java SE: "Couldn't find MainClass..."

Staff note (Bear Bibeault):

Moved to the Eclipse forum.

 
author & internet detective
Posts: 39538
778
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use the same Eclipse with different workspaces. And if you have them both open, you have two windows with different settings.

Don't worry about your Java home. In your "side projects" workspaces, open the workspace preferences and search for "installed JREs". That will let you configure multiple versions of Java and switch
 
Saloon Keeper
Posts: 21133
134
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JAVA_HOME is not an official part of Java. It's a convention that many - but by no means all - Java applications use to locate a particular JVM. In many cases, such as Tomcat, the app is actually launched via a shell script, and JAVA_HOME is an environment variable, which is something that shell scripts like to use for reference purposes. Also, each instance of a shell can have its own environment variable set, so you can set a JAVA_HOME in one shell window that points to a completely different Java version than what another command shell is using. It's a bit trickier when launching from a GUI desktop icon, but even there there are ways.

In particular, Eclipse doesn't use JAVA_HOME as the basis for running Eclipse (which is after all written in Java) itself. Instead Eclipse has a master configuration file to allow it to use the desired JVM version.

As Jean has said, Eclipse doesn't require projects in an Eclipse workspace to use the same JVM code that Eclipse itself is using. You can install and use a different JVM for each project in the workspace. Essentially, you're defining a dictionary in Eclipse that associates a JVM location (and optional properties) with a symbolic name that you then reference in a project's properties.
 
Enjoy the full beauty of the english language. Embedded in this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!