Running Eclipse Indigo on JDK7 - eclipse

I tried to run Eclipse Indigo on a JDK7 on Windows 7 32bit, But Eclipse.exe complains with a dialog telling me that no java virtual machine was found after searching at the given location.
I've tried multiple times to set the -vm argument to be sure, it just doesn't work. Any ideas why?

Verify the JDK Installation
Essentially, run java -version in the cmd, you should see the output.
See http://alexsmail.blogspot.com/2012/01/how-to-install-jdk-7.html step 3
Check your Environment Variables (JAVA_HOME and path).
See http://alexsmail.blogspot.com/2012/01/how-to-install-jdk-7.html step 0

This is my eclipse.ini file which is in the same directory as eclipse.exe. -vm must be on it's own line and the path to javaw.exe must be on it's own line. I'm pretty sure I had to use forward slashes. Also, -vmargs has to be the last thing in eclipse.ini.
-vm
C:/Program Files/Java/jdk1.6.0_31/bin/javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms64m
-Xmx512m
-XX:PermSize=64m
-XX:MaxPermSize=512m

Related

I kept getting the message like 'failed to create the Java Virtual Machine' on MacOS Mojave

Failed to save 'eclipse.ini': Unable to write file
'/Volumes/Eclipse 2/Eclipse.app/Contents/Eclipse/eclipse.ini' (Unknown (FileSystemError): Error: EROFS: read-only file system, open '/Volumes/Eclipse 2/Eclipse.app/Contents/Eclipse/eclipse.ini')
This what happened when I try to manipulate what in this ini file as suggested in similar problems.
Here is my error message of saving in visual studio code
-startup
../Eclipse/plugins/org.eclipse.equinox.launcher_1.5.700.v20200207-2156.jar
--launcher.library
../Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.1200.v20200508-1552
-product
org.eclipse.epp.package.jee.product
-showsplash
org.eclipse.epp.package.common
--launcher.defaultAction
openFile
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Dosgi.instance.area.default=#user.home/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-Dosgi.requiredJavaVersion=1.8
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms256m
-Xmx2048m
--add-modules=ALL-SYSTEM
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
I do not have permission for this file for some reason. Also my previous question someone suggests me that the problem is not installing java jdk but after I installed it, then launch java ee version, same error appears. How do I fix this?
I open the get Info of this ini file, it says dylan(writes/reads). I am confused.
Can someone tell me how to exactly install it.
Moreover, I look it up in java official guide of solving this problem, it says
If you’re seeing this popup when you launch Eclipse itself, or the Eclipse installer on your macOS, this post is for you. First, there’s a bit more details on the Eclipse and JDK bug trackers. To fix this, you will need to uninstall the problematic JDK version and install the latest one on your macOS machine:
Run the /usr/libexec/java_home -V command to list all installed JVM versions.
Identify the problematic version of the JVM – in my case it was “14, x86_64: "Java SE 14" /Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home“.
Delete that version – with something like
“sudo rm -rf /Library/Java/JavaVirtualMachines/jdk-14.jdk/“
Install the latest matching JVM / JDK – at the time of this writing it is 14.0.1
Verify that it appears in the list of installed JVMs with
/usr/libexec/java_home -V
If needed, point the Eclipse.app/Contents/Eclipse/eclipse.ini to the location of the newly installed JVM (-vm parameter)
I am not sure how it works. For example, how do I identify which one is problematic, and what command should I use in terminal to install it, etc.
I have the same problem and I updated eclipse.ini file as following:
-vm
/Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home/bin
I added these lines to update -vm parameters right before -vmargs parameters and it works fine for me. Got from this website -> https://www.journaldev.com/10882/eclipse-ini-vm-arguments-file-location-mac-windows

STS : Failure to create Java Virtual Machine

I am unable to start my STS (Spring Tool Suite) on my new macOS - High Sierra Version - 10.13.6
The following are the contents of my STS.ini file
-startup
../Eclipse/plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar
--launcher.library
../Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.551.v20171108-1834
-product
org.springsource.sts.ide
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.8
--add-modules=ALL-SYSTEM
-Xms384m
-Dosgi.module.lock.timeout=10
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-Xdock:icon=../Resources/sts.icns
-Xmx1200m
-XX:+UseCompressedOops
Java version - openjdk version "1.8.0_144"
STS version - 3.9.6
Mac Version - 10.13.6
Tried adding -vm option with value /Library/Java/JavaVirtualMachines/1.8.144_1_openJDK_macosx.jdk/Contents/Home and changing Xmx/Xms to different values in my STS.ini but nothing worked.
Any suggestions?
Faced a similar issue when I upgraded Java from Java 8 to openjdk 14. I resolved it by doing the following:
Open /Applications/SpringToolSuite4.app/Contents/Eclipse/SpringToolSuite4.ini
Add the following lines to the start of the file and save it:
-vm
/Library/Java/JavaVirtualMachines/openjdk-14.jdk/Contents/Home/bin/java
Now, you need to point the softlink of libjli.dylib inside /Library/Java/JavaVirtualMachines/openjdk-14.jdk/Contents/MacOS/ to the right location. To do that, do the following:
cd /Library/Java/JavaVirtualMachines/openjdk-14.jdk/Contents/MacOS/
sudo rm libjli.dylib
sudo ln -s /Library/Java/JavaVirtualMachines/openjdk-14.jdk/Contents/Home/lib/libjli.dylib libjli.dylib
Now, try opening SpringToolSuite4 and it should work seamlessly. If you are using another version of jdk, make sure that the path is chosen correctly in the ini file as well as the softlink creation part. Note: You do not need to play around with vmargs to adjust the -Xms and -Xmx args to resolve this.
open file /Applications/SpringToolSuite4.app/Contents/Eclipse/SpringToolSuite4.ini
add
--launcher.appendVmargs
-vm
/Library/Java/JavaVirtualMachines/jdk-11.0.2.jdk/Contents/Home/bin/java

Eclipse Crash on Launch - JVM terminated. Exit code=2

I will do my best to make my situation as clear as possible. I tried googling the error message, but I haven't found any topic regarding exit code=2 anywhere. I only found topics regarding different exit codes, and I'm trying to fix my issue following the advice given there - no luck so far. Also I'm a newbie when it comes to any form of Linux (the distribution I'm using is Ubuntu).
Problem:
My eclipse crashes on launch with following error window popping up:
JVM terminated. Exit code=2
/usr/bin/java
-Xms40m
-Xmx384m
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=/usr/share/eclipse/dropins
-jar /usr/lib/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.dist.jar
-os linux
-ws gtk
-arch x86_64
-showsplash /usr/lib/eclipse//plugins/org.eclipse.platform_3.8.1.dist/splash.bmp
-launcher /usr/lib/eclipse/eclipse
-name Eclipse
--launcher.library/usr/lib/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.dist/eclipse_1503.so
-startup /usr/lib/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.dist.jar
--launcher.overrideVmargs
-exitdata 670018
-vm /usr/bin/java
-vmargs
-Xms40m
-Xmx384m
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=/usr/share/eclipse/dropins
-jar /usr/lib/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.dist.jar
There is a big posibility that my problem is related to lack of proper Java version installed.
I suspect this because:
I had eclipse running on my pc two days ago. Yesterday I had to use a web-application which required a specific version of JRE installed. Due to my lack of linux knowledge, I spent a few hours removing my current installations of java JREs and JDKs (so I could install the required version) using multiple guides that I found on the internet (some included commands like sudo apt-get purge java* and other commands including removing, java and *). Today my Eclipse wont launch.
When I run
java -version
it says no such file or directory, but the webpages like
http://www.java.com/en/download/testjava.jsp
http://javatester.org/version.html
do work and say that my java version is
Vendor: Oracle Corporation
Version: Java SE 7 Update 25
Operating System: Linux 3.5.0-34-generic
Java Architecture: 64-bit
installed using this method:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
Can someone please guide me how to solve this specific problem? Luckly I haven't made any important projects in my Eclipse yet so I don't mind purging the installation if necessary.
To be completely honest the main reason I need Eclipse for is the Remote Server Explorer option, so if anyone knows a good IDE other than Eclipse that can provide just as good Remote Server Explorer it would be a perfect-fast-temporary solution.
I got the same error message and solved it by starting eclipse with the -clean parameter.
To use the clean parameter:
Edit the eclipse.ini file located in your Eclipse install directory and insert -clean as the first line. Once started, remove the -clean parameter in the eclipse.ini file.
It worked for me...
Set\Change your current jdk path in eclipse.ini.
-vm
C:\Java\JDK\1.8\bin\javaw.exe
Sample Ini file contents:
-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
The following environment variables were removed and the Connect client was able to successfully launch:
_JAVA_OPTIONS
JAVA_TOOL_OPTIONS
IBM_JAVA_OPTIONS
The operating system environment variables can be found by:
From Desktop, right-click on My Computer icon-> Properties -> Advanced.
Click the Environment variables button to remove the before-mentioned system environment variables.
In the environment variables check the value of Path variable, it would have reference to the Oracle javapath which would be incorrect java version and may cause the issue. just remove "C:\ProgramData\Oracle\Java\javapath;" from the Path variable and try.
We need to delete all the content in the folder specified in the error msg.Please go through the link below for example JVM Terminated

eclipse not starting

When I am trying to start eclipse, I am getting following error window:
Java was started but returned exit code=1<br>
C:\Program Files\Java\jdk1.7.0_03\bin\javaw.exe<br>
-Xms40m<br>
-Xmx384m<br>
-XX:-UseCompressedOops<br>
XMaxPermSize=256m<br>
-jar C:\Eclipse\\plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar<br>
-os win32<br>
-ws win32<br>
-arch x84_64<br>
-showsplash<br>
-launcher C:\Eclipse\eclipse.exe<br>
-name Eclipse<br>
--launcher.library C:\Eclipse\\plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.100.v20110502\eclipse_1406.dll<br>
-startup plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar<br>
-launcher.overrideVmargs<br>
-Xms40m<br>
-Xmx384m<br>
-XX:-UseCompressedOops<br>
-XX:MaxPermSize=256m<br>
-jar C:\Eclipse\\plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar<br>
Background:
OS: Wndows 7 64 bit SP1
Java: jdk1.7.0_03
Eclipse: eclipse-SDK-3.7.2-win32-x86_64
Java installation folder: C:\Program Files\Java\jdk1.7.0_03\
Path: C:\Program Files (x86)\PC Connectivity Solution\;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Dell\DW WLAN Card;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Perforce;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;D:\Nitin Personal\Softwares\;C:\Windows\System32\;C:\Program Files\Java\jdk1.7.0_03\bin;C:\Program Files\Java\jre7\bin
Following is the contents of eclipse.ini:
-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.100.v20110502
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
openFile
-vm
C:\Program Files\Java\jdk1.7.0_03\bin\javaw.exe
--launcher.defaultAction
-vmargs
-Xms40m
-Xmx384m
-XX:-UseCompressedOops
Please help.
I faced the same problem and it was solved by changing the value of -Xmx to a lower value in eclipse.ini.
The old configuration was:
-vm C:/your_appication/jvm/jvm160_32/jre/bin/javaw.exe -vmargs -Xms128m -Xmx1024m
The new configuration is:
-vm C:/your_appication/jvm/jvm160_32/jre/bin/javaw.exe -vmargs -Xms128m -Xmx256m
I fixed this problem by removing the javaw.exe. Mine was in C:/Windows/system32/javaw.exe
On the command prompt, call
eclipse -clean
This will launch the eclipse successfully. It worked for me.
Is that the default eclipse.ini, or was it edited? "openFile" should be on the line after "--launcher.defaultAction"
Add this line to the .ini
-vm
c:/apps/java/jdk1.6.0_21/jre/bin/server/jvm.dll if that doesn't help then check and see you have the right eclipse downloaded (32/64bit) Reinstall JDK and JRE to the latest versions see if that helps.
make sure that you do not mix up 64bit Java runtime with 32bit eclipse IDE (or vice versa).
this once caused a similar problem for me
Another option is to try lowering the value specified for -Xmx.
I ran into the same error when starting Eclipse Helios on a Windows XP machine (so, both 32-bit OS and 32-bit JDK). I hadn't changed any configuration on my machine in a while, so I was stumped.
The only difference was that I connected to the machine via RDP. I believe doing this causes Windows to load some additional DLLs in locations that limit the available contiguous memory. In my case, I am consistently able to start up the JVM -Xmx1280m when I am sitting in front of the machine, but I can only manage -Xmx1024m when connected via RDP.
Remove this line
-vm C:\Program Files\Java\jdk1.6.0_33\bin\javaw.exe
As per Eclipse Wiki - eclipse.ini vm_value (windows example)
This might not work on all systems. If you encounter "Java was started but returned exit code=1" error while starting the eclipse, modify the -vm argument to point to jvm.dll
So in your case it would be
-vm
C:\Program Files\Java\jre7\bin\client\jvm.dll
Also note that
The -vm option must occur before the -vmargs option, since everything after -vmargs is passed directly to the JVM
I'm running successfully with -Xmx1024m
I was having this problem regularly - but only the 2nd time that I launched Eclipse without having rebooted Windows.
I am developing for Android and fixed the problem by making sure that my testing device was not connected via USB when starting Eclipse the 2nd and subsequent times.
-vm
C:\Program Files (x86)\Java\jdk1.6.0_20\bin\javaw.exe is for 32-bit
If you have downloaded 64-bit eclipse install, download JDK1.7 which will by default get installed under C:\Program Files\Java.
Change the -vm argument in the eclipse.ini file pointing to C:\Program Files\Java\jre7\bin\javaw.exe.
Your issue should be resolved with this.
I fixed this by removing all Java components from my Win7 PC and reinstalling "Java SE Runtime Environment 7" for 64bit, because my Eclipse installation was also 64 bits.
Something might went wrong in eclipse-workspace. I had eclipse show only splash-screen at startup and then disappeared (=crashed).
I was able to recover my precious RemoteSystemsExplorer-connections by renaming old workspace. Then start Eclipse, so it will create empty workspace. Then closed eclipse. Copied from old workspace: workspace3.metadata.plugins\org.eclipse.rse.core folder to new workspace folder.
All responses indicate that this issue could be based on your eclipse configuration or java.
I think there should be some kind of log or pop up to let the user know why the IDE is unable to launch.
In my case, restarting the computer resolved the issue.
I fixed the problem by adding the below lines
-vm
C:\Program Files (x86)\Java\jdk1.6.0_24\bin\javaw.exe
This line was not present in my jbdevstudio.ini file.
I think the problem occured because I had copied the 'Java' folder from C: to D:, hence now there were two javaw.exe present in my system.
Note:- Please add them in two lines as given above.
I have tried all of the above but nothing worked .Finally i re Installed my Java updates it worked
Just changed
-Dosgi.requiredJavaVersion=1.6 to 1.7
I resolve this issue by adding below line to eclipse.ini file in my case
-vm
C:\Program Files\Java\jdk1.8.0_91\jre\bin\javaw.exe
Thanks
i've fixed it by uninstalling all java components and re-installing the jdk .

Maven JRE error in ubuntu:Eclipse is running in JRE but a jdk is required

Can anybody help in Eclipse maven error in ubuntu.I found the soln in windows but in ubuntu(linux) i m unable to remove the Eclipse maven error."
Eclipse is running in JRE but a jdk is required".
I have JDK6 installed in ubuntu.
$java -version
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) Server VM (build 19.1-b02, mixed mode)
$ which java
/home/ali/Jdk6/bin/java
Please Help.
That may be the your default Java installation, but it doesn't mean that's your only Java installation. Assuming you haven't installed any by hand, you should look in Synaptic to see if you have sun-java6-jre installed in addition to sun-java6-sdk (note that sun-java6-jre installs in a subdirectory of where sun-java6-sdk installs. You may also have OpenJDK installed, et al.
Next, be aware that Eclipse does NOT use $JAVA_HOME to find a JDK to run under. The VM to use is defined in the eclipse.ini config file, and if one isn't defined there, it looks for a JRE installed under its own directory.
See this page for more information.
Solved: m2eclipse: Eclipse is running in a JRE, but a JDK is required
G:\study\eclipse-jee-galileo-SR2-win32\eclipse\eclipse.exe -vm "E:\Program Files\Java\jdk1.6.0_23\bin\javaw.exe"
I had the same problem, and found a lot of fixes for Windows but not for Ubuntu.
This seems to be working for me in Ubuntu 12.04, with Eclipse Juno:
I followed the instructions here to install Sun Java JDK 6:
http://www.devsniper.com/ubuntu-12-04-install-sun-jdk-6-7/
(if you already have Sun Java JDK installed, then maybe just try the parts labelled "Choose default java" and "Verify the symlinks".)
Then I added the following to my eclipse.ini file:
-vm
/usr/lib/jvm/jdk1.6.0_32/bin/java
Note that it seems you have to put the new line in, and it must go in the right place in the file, after --laucher.defaultAction but before -vmargs. So my full eclipse.ini now reads:
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20120522-1813
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
-Dandroid.sdk.path=/home/gguser/android-sdk-linux
openFile
-vm
/usr/lib/jvm/jdk1.6.0_32/bin/java
-vmargs
-Xms512m
-Xmx512m