I am getting error whenever I click eclipse icon that version 1.6 of the jvm is not suitable for this product. Version 1.7 or greater is required.
My other java applications in the system are using JRE 1.6 so I dont want to change that.
I have JDK 7 in my system as well but how can I point my eclipse to JDK 1.7 instead of default 1.6.
Thanks
You have several options.
Since you want to default to Java 1.6 for most of your other applications, I'd suggest modifying your Eclipse.ini:
https://wiki.eclipse.org/Eclipse.ini
EXAMPLE:
-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vm
C:\Java\JDK\1.8\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx1024m
Related
I just downloaded Eclipse Luna 4.4 and added jboss eap 7.1 after installing jboss tools plugin.
While starting the server getting below error:-
Unrecognized option: -vmargs
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Java_Home environment variable also set correctly.
Doing all this stuff in Mac OS X El Captain.
Using Java 8 and after changing -Dosgi.requiredJavaVersion=1.6 to 1.8 in eclipse.ini file still getting same error.
Please help me in this.
Eclipse.ini file is below
-startup
../../../plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.library
../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.200.v20140603-1326
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.6
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-XX:MaxPermSize=256m
-Xms40m
-Xmx512m
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
try to use eclipse juno with jboss 5.5
I was working on my Java Code without problems. Then I updated to Java 8 because of that I could not start Eclipse anymore. So I downgraded it again to Java 7. Now I can start Eclipse but if I try to start any Java project I get this:
Thread [main] (Ausgesetzt (Ausnahmebedingung UnsupportedClassVersionError))
Launcher$AppClassLoader(ClassLoader).loadClass(String, boolean) line:not available
Launcher$AppClassLoader.loadClass(String,boolean) line: not available
Launcher$AppClassLoader(ClassLoader).loadClass(String) line: not available
LauncherHelper.checkAndLoadMain(boolean, int, String) line: not available
C:\Program Files\Java\jre7\bin\javaw.exe(10.06.2015 19:24:48)
Already searched on google for this problem. There were some solutions with Step-filtering but it does not help.
Hope someone could help me. (If there are some words you don't understand: thats german but don't worry they are not necessary)
Thanks
You can explicitly specify the -vm argument in eclipse.ini file as in below and restart eclipse
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20150204-1316
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vm
C:\Program Files\Java\jre7\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx512m
If you still face the issue, try to open eclipse in new workspace and import your projects which are in old workspace folder into new workspace folder
Note: It is advisable to have jdk as value for -vm argument rather than jre
Update your java path to point to Java 7.
Actually I downloaded the Android SDK from their site it was a bundle for android development and it was working fine. Then I downloaded the Netbeans from Java official site. It said it requires JDK7 so I downloaded that too. Now the Net Beans is working fine but eclipse displays this really long message box saying that Java was started but returned exit code 1 and then followed by some gibberish
My eclipse configuration file has the following text in it:
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20120913-144807
-product
com.android.ide.eclipse.adt.package.product
--launcher.XXMaxPermSize
256M
-showsplash
com.android.ide.eclipse.adt.package.product
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx768m
-Declipse.buildId=v22.3.0-887826
-XX:MaxPermSize=512M
Add '-XX:-UseCompressedOops' to the eclipse.ini
I am using eclipse 3.7 indigo , the issue that I am facing is when I start my eclipse my machine gets too slow even the eclipse get hang some times in between , the settings of my eclipse.ini file is below..
-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
please advise how to overcome from this..!!
Change this values to the higher ones:
--launcher.XXMaxPermSize 256m
-Xms40m
-Xmx512m
Perhaps this will help? I mean, I don't know the specs of the machine you're on, but this is nice on less powerful machines.
What are the best JVM settings for Eclipse?
Check with the eclipse.ini file and add the following java parameters and values.
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xmn128m
-Xms1024m
-Xmx1024m
-Xss2m
-XX:PermSize=256m
-XX:MaxPermSize=256m
-XX:+UseParallelGC
This worked for me. Might help.
I'm having trouble setting up a new eclipse installation with the -vm option. I'm using the eclipse.ini file below (which has worked in the past). I need this for the m2eclipse plugin. Currently, if I include the -vm option eclipse fails to start.
Any idea what the problem is with this?
-startup
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-vm
C:\Program Files\Java\jdk1.6.0_20\bin\javaw.exe
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vmargs
-XX:PermSize=256m
-XX:MaxPermSize=512m
-Xms128m
-Xmx1024m
Are you using a 64bit version of Eclipse with a 32bit JVM?
I'm guessing its the space in the Program Files part of the path. The below example works fine for me. Can you try to install the JDK in c:/apps and see if the script below works for you?
-startup
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-vm
C:/apps/jdk1.6.0_15/bin/javaw.exe
-product
org.eclipse.epp.package.java.product
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vmargs
-server
-Dosgi.requiredJavaVersion=1.5
-Xms1200m
-Xmx1200m