Eclipse error code 1 in Windows10 - eclipse

I have downloaded scala ide for eclipse into my windows 10 system which is 64 bit one.
If I try to open eclipse then is throwing error code 1 saying java was started but returned error code 1.
I gave java path in environment variable and added the java path into eclipse.ini as below but still throwing the same error.
eclipse.ini code:
-startup
plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.500.v20170531-
1133
-vm
C:\Program Files (x86)\Java\jre1.8.0_144\bin\javaw.exe
-vmargs
-Xmx2G
-Xms200m
-XX:MaxPermSize=384m

Is your Eclipse version a 64 bit one? If so you should have Java Development Kit 64 bit. If you have 32bit Eclipse, then you need 32bit version of Java Development Kit. And if you get the same error after installing the proper versions of the Eclipse and JDK, you should go to Eclipse ‘s directory (eg: C:\ProgramFiles\Eclipse\ for 64bit) and edit the eclipse.ini file by adding the following lines after “—launcher.appendVmargs” and before -vmargs;
-vm
C:\ProgramFiles\Java\javaJdkversion that you have\bin\javaw.exe
save this and launch eclipse.

Eclipse 64 bit requires Java 64 bit.
On 64-bit Windows you can either use:
your current 64-bit Eclipse IDE with a 64-bit Java VM or
a 32-bit Eclipse IDE with your current 32-bit Java VM.
See also Eclipse Wiki: eclipse.ini - Specifying the JVM

Related

The JDK is missing and is required to run some NetBeans modules

Complete error message:
The JDK is missing and is required to run some NetBeans modules
Please use the --jdkhome command line option to specify a JDK installation or see http://wiki.netbeans.org/FaqRunningOnJre for more information.
Some details: I just installed Netbeans on Linux mint for the first time and when I start it when its turning on modules this error message appears. But I do have jdk installed.
$ java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
$ javac -version
javac 1.8.0_66
Find the file [netbeans installation directory]/etc/netbeans.conf
Luckily, Linux has a find helper like
find /home/ -name "netbeans.conf,
in which you can change the /home/ to a location where you want to search.
I found it at /usr/local/netbeans-8.1/etc/netbeans.conf
Once, you found the file, the following property needs to be set:
netbeans_jdkhome="[jdk_path]"
where you can find the jdk_path using:
update-alternatives --config java
In my case, I found it at /opt/java/jdk1.8.0_191
[Solved] For Mac OSX 10.11 (El Capitan).
Solution may be similar for other Unix-based systems.
The problem may have occurred because I inadvertently installed the jre
prior to installing the jdk. I uninstalled the jre, installed the jdk
and reinstalled NetBeans but the problem (popup window) remained.
However, the fix was fairly simple.
1. Make sure NetBeans is not running.
2. Make sure the jdk is installed.
3. Determine the location of the jdk:
The jdk location can be determined by entering the following (in Terminal):
$ /usr/libexec/java_home
For my system, the output was:
/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home
4. Edit the NetBeans configuration file to indicate the location of the jdk.
Near the bottom of this Netbeans configuration file (or equivalent for your NetBeans version):
/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/etc/netbeans.conf
Comment out the following line (insert a # before the first character):
#netbeans_jdkhome="/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/bin/jre"
Then, add the following line (or equivalent for your jdk version):
netbeans_jkdhome="/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home"
Then, save and exit the editor.
5. Start NetBeans (no more popup window indicating that the jdk is missing).
When netbeans has problems trying to find the path of the jdk, it's mainly because the version of the jdk does not match. Open the file C:\Program Files\NetBeans 8.2\etc\netbeans.conf, and verify that netbeans_jdkhome = "C:\Program Files\Java\jdk1.8.0_111".
Open netbeans.conf
sudo nano "/usr/lib/jvm/java-8-oracle/netbeans.conf"
Set proper sdk path:
netbeans_jdkhome="/usr/lib/jvm/java-8-oracle"
Exit Ctrl + X and to save changes Ctrl + T
This error showed up when I updated the Mac to Mojave. To fix, I edited the netbeans.conf file with the current jdk by using Terminal to find the correct jdk. Type
/usr/libexec/java_home -V
Here was my output.
Matching Java Virtual Machines (4):
1.8.311.11 (x86_64) "Oracle Corporation" - "Java" /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
1.8.0_131 (x86_64) "Oracle Corporation" - "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home
1.8.0_25 (x86_64) "Oracle Corporation" - "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home
1.7.0_79 (x86_64) "Oracle Corporation" - "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
Entering the first jdk listed did not work.
I edited the conf file with the second one listed:
netbeans_jdkhome="/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home"
Restarted Netbeans. That fixed it.
This worked for me
1. install full JDK
2. either edit <netbeans-IDE-installation>/etc/netbeans.conf
2.1 unmark netbeans_jdkhome
2.2 link to JDK location e.g. /usr/local/share/java/jdk1.6.0_07/
3. or use --jdkhome command-line option e.g. ./bin/netbeans --jdkhome /usr/local/share/java/jdk1.6.0_07/
take care with the "/" at the end
More info in http://wiki.netbeans.org/FaqRunningOnJre
Ubuntu 16.04 LTS:
Uninstall the netbeans you have.
Delete .cache/netbeans folder
Download http://www.oracle.com/technetwork/java/javase/downloads/jdk-netbeans-jsp-142931.html
Install your download
I have this problem to. But now i resolove this problem with edit one line.
Find and open this file /etc/netbeans.conf
If you see netbeans_jdkhome="C:\Program Files\Java\jre1.8.0_151" replace netbeans_jdkhome="C:\Program Files\Java\jdk1.8.0_131"
Save as adminstrator
Problem reseloved
In mid April 2019, Oracle has changed the JDK's licence. However, I was still able to solve this issue with NetBeans 11 and the JDK 12's open source build on my Windows machine. Just downloaded the open source JDK from https://jdk.java.net/ and extracted it. Then, in my NetBeans config file, I typed in the path to the extracted directory (NOT the "bin" folder!).
I resolved this problem by changing default version of JRE and JDK that I'm using to 11.x.x with following commands:
sudo update-alternatives --config java
sudo update-alternatives --config javac

Eclipse not compatible with jdk1.4

Hi Am using eclipse galileo and jdk version jdk1.4.Am not able to open eclipse as its give "jdk1.5 or above version required" error.How do i resolve it?
Copy and paste the lastest version of JRE from your C:\program files\jre... to the eclipse folder and rename it as "JRE" and it should work.
Please install JDK/JRE version 1.5 or above, and then add the following to the eclipse.ini file in the eclipse home directory
-vm
$JDK_HOME\bin
Note: The path of the JRE should be in the line after -vm and not in the same line.
Eclipse will use the JVM available at this path to launch

Install New Software on Eclipse not working on Mac

I have downloaded eclipse classic x86_64 3.7 cocoa on my Mac Intel Core 2 Duo with snow leopard 10.6.8
I have extracted and copied the eclipse directory to Applications folder. When run,
I get following errors
System property http.nonProxyHosts has been set to local|*.local|169.254/16|*.169.254/16 by an external source. This value will be overwritten using the values from the preferences
Unexpected error loading extension: org.eclipse.equinox.p2.metadata.repository.simpleRepository
java.lang.NoClassDefFoundError: Could not initialize class org.apache.commons.httpclient.HttpClient at org.eclipse.ecf.provider.filetransfer.httpclient.HttpClientBrowseFileTransferFactory$1.sendBrowseRequest(HttpClientBrowseFileTransferFactory.java:53)
Error while reading from repository: http://download.eclipse.org/releases/indigo/site.xml.
I have following java version
java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03-384-10M3425)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-384, mixed mode)
I have tried with eclipse classic 32 and 64 bit versions, with both i have the same problem .
I have also tried tweaking around priority of java version (32 or 64) under Java preferences.
Deleting /Library/Java/Extensions/log4j-1.2.15.jar resolved the issue.
Incase you are using ubuntu instead and had this problem, just go
cd /usr/java/packages/lib/ext/
sudo rm log4j-1.2.15.jar
sudo rm slf4j-*
I also had this problem and had nothing under /Library/Java/Extensions
You can notice that Eclipse reports: "The value will be overwritten using values from the preferences". So what you can do - visit Preferences > Network Connections and under 'Proxy Bypass' add Host: *
This has resolved the issue for me.
I set this to solve the problem:
http.sslVerify false in the egit config file.

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

Why System.getProperty("java.home") works different for Eclipse 3.4, 3.5, 3.6?

I develop plugins (to be honest I started not so long time ago) and test my plugins on different Eclipses. I have Eclipse 3.4, 3.5, 3.6 installed.
in C:\Program Files\Java there are:
jdk1.5.0_22
jdk1.6.0_21
jre1.5.0_22
jre6
for all versions of Eclipses, in here (Windows -> Preferences -> Installed JREs) there is "jdk1.5.0_22" with the path "C:\Program Files\Java\jdk1.5.0_22"
So, can not figure out why for Eclipse 3.5 and 3.6 this
System.getProperty("java.home")
prints
C:\Program Files\Java\jdk1.5.0_22\jre
but in Eclipse 3.4 it prints
C:\Program Files\Java\jre6
Could anyone give me a glue which value is used by System.getProperty("java.home")?
You can check your Project Build Path:
Example:
The java.home property returns the Java installation directory. In Windows, this is set either with the JAVA_HOME environmental variable or in the eclipse.ini file. It could be also given as a command parameter in the eclipse.exe.
You can read some instructions about running eclipse here.
Here, there is explanation how to solve similar problem
http://tech.karolzielinski.com/m2eclipse-eclipse-is-running-in-a-jre-but-a-jdk-is-required
In my case it was enough to add -vm option to eclipse.ini file for Eclipse 3.4.
-vm
C:\Progra~1\Java\jdk1.5.0_22\jre\bin\javaw
Thanks everyone!