I seem to have a 32bit vs. 64bit problem here. It should be simple to solve, but I'm hoping you can help me by pointing out the problem. I really want to avoid re-installing OSs, Eclipse, several plugins, JDKs and JREs over and over again to find a working solution. Many thanks in advance!
I build on a 64bit Thinkpad, in 64bit Windows 7.
I have built an Eclipse RCP application in Indigo (3.7.1.), 32-bit version.
The only "Javas" I have on this machine is a 1.6.29 32bit JRE, and a 1.6.29 32bit JDK. I've installed these (perhaps in false assumption) to be able to build for 32bit systems, and not screw things up by building on a 64bit machine.
Seems I was wrong: when I export the application (as Eclipse product) I get the dreaded Java exit code=13:
I am sure this is somehow to do with the combination of 32bit software on a 64bit system (if you can prove me wrong, even better!).
Does one of you know how I can set this up properly and still be able to build for win32?
Again, many thanks!
UPDATE
I have installed 64-bit Eclipse 3.7.1, and JRE 1.6_30 + JDK 1.6_30, both 64-bit versions. However, the error remains! I think this might either be a bug, or I'm doing something else wrong.
First of all, here is the error message:
For this build, I didn't use the Delta Pack but instead added the RCP SDK Software Site to the target definition, choosing the option "include all environments" (or similar).
Also in the target definition, I set the target environment to win32 (OS and WS) and x86_64 (arch). Furthermore, I set the Environment to use the default JRE.
In the product configuration, I set the Execution Environment to JavaSE 1.6, and set the JRE to be packaged.
Also, here's my 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
Any ideas?
I would recommend you to install everything as 64bit or 32bit system. That's a common problem with eclipse and I haven't found a better solution.
The Eclipse website tells me that
"Exit code 13 is returned from Main when it wants the launcher to display an error message. Generally, the error message will just be "an error has occurred, check your log file". Look for a log file in your configuration directory."
Some of these errors have been caused by not having the correct java version installed (Cannot run Eclipse; JVM terminated. Exit code=13), while others seem to have been caused by a "#" character in their eclipse directory (http://www.eclipsezone.com/eclipse/forums/t105198.html).
Maybe one of these reasons causes the crash.
Seems this had nothing to do with 32-bit vs. 64-bit and everything with my lack of experience. The product configuration simply wasn't set up correctly. I've bypassed this by creating a new one which uses the automatically created plugin run config from when you start the application via the "Launch an Eclipse application" link in Eclipse itself.
For those who come across a similar problem, here is how it can be done.
Launch the application via "Launch an Eclipse application"
Go to Run > Run Configurations... and memorize the name of the run configuration
Create a new Product Configuration, and choose "Use a launch configuration:" in the wizard. From the dropdown list, choose the run configuration you have memorized in step 2.
Give the new product configuration an ID, Version and Name, and add further info (e.g., in the Product Definition section) as needed.
Synchronize and Launch from within Eclipse to see if everything works fine.
Export and be happy.
Install all in 64bit.
Then to run (emulate) your Eclipse in 32bit
Just: insert an argument in:
Run Configurations... -> Arguments (tab) -> Program arguments : Type -d32
Old question but it seems worth answering. I just had this problem with an RCP based on features. It turned out that I was exporting the RCP with the feature projects closed. When I opened them and exported the product again, everything worked fine.
try moving the project to the root of the drive
c:\test\eclipse\
solved:D
1. check the operating system is it 32 bit or 64 bit.. but i think its not problem on my computer because i am using 32 bit jdk and 32 bit eclipse on my windows 7 64 bit.
2. if u still have problem ... try to move eclipse to C:/ its work for my friends.. with problem returned error 13
Related
I am trying to install the latest Java JRE for Windows 8.1:
http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html
And none of the installers work. Online/Offline/x86/x64
I double-click the installer, get the UAC popup, approve, and then it thinks for a second and then just does nothing. How can I troubleshoot this more?
Things I've Tried:
Disabling UAC
Disabling all anti-virus
Disabling Windows Firewall / Defender
Downloading older version of Java (still does nothing when run)
Running as Administrator
Launching from admin-command-line
Changing compatibility mode (all of vista -> windows 7)
Running in Safe Mode (same behavior)
Uninstalling all older Java installations (big mistake)
Monitoring Process List - the java installer pops up for a second and
disappears
Installing through the JDK - JDK installer also does nothing when launched
Event Viewer shows no errors
I can't find any logs or errors that might help narrow down what the issue could be.
Any help would be very much appreciated. If there are any additional tools I could check out to help with troubleshooting, or any logs people know of, I could use any help I could get.
Thank you!!
After hours of fiddling around, I think I finally have something working. It seems that there's some weirdness for any system that has ever upgraded their version of Windows (I went from 8 to 8.1) with some sort of MSI ID sort of thing. So, here's how I finally ended up:
HOW I FIXED:
1) The issue started after the Java 8 "51" installer. So the 51 still works, get it here:
http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html
You want: jdk-8u51-windows-x64.exe (or i586)
Install older version
2) download latest Java .zip archive (like jre-8u91-windows-i586.tar.gz ) and unzip it in any location, preferably "c:\Program Files\Java"
3) Go to "C:\Program Files\Java" and rename jre1.8.0_51 to something else ("jre1.8.0_51_bak" maybe)
4) Copy the contents of the extracted .tar.gz contents into a new folder named "c:\program files\java\jre1.8.0_51" (or rename the directory)
So basically using the install directory for 51, but adding the latest Java files into the folder that the installation is pointing at.
Quick fix, for now, just to help anybody in a pinch. I'll update as I continue to sort it out and if there's any new information.
Good luck!
I recently decided to start trying Android app development, so I downloaded the Java SE Development Kit 8 (x86) for Windows (I got Windows 8 64bit, but my guide recommends getting the 32bit one), the Android SDK, and the Eclipse IDE for Java Developers (x86).
However, my Eclipse won't launch when I double click eclipse.exe! Instead, I get the following error message:
I tried adding Java to my Path variable in my Environment variables as suggested in some of the solutions I looked up, but it still doesn't launch properly.
Anyone know what else I can try? Also, if possible, please do not use super-technical vocabulary as I'm new to these kinds of stuff and will not understand you...thank you haha :D
I had the same issue and was trying to install different versions of JDK: 1.6, 1.7, 1.8.
It didn't help much.
The problem was resolved when I changed PATH variable by removing
C:\ProgramData\Oracle\Java\javapath;
In command prompt I also ran following commands:
set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_25
set PATH=C:\Program Files\Java\jdk1.8.0_25\bin;%PATH%
But I think the most important was to remove C:\ProgramData\Oracle\Java\javapath; from the PATH.
I know exactly how to solve your problem. Go to search and put in environment, a prompt will come up and ask you to "Edit environmental variables for your account" click that and a window will pop up. There will be the current paths which are running on the top (you should have your JDK version running, mine is 1.8) and on the bottom part there will be paths to choose from. Select (on the bottom part) the java path and delete it, then click okay. This should work.
If it didn't work, You may also add a new path to the java bin folder which worked for me.
Here is an alternative:
As described here, make sure that you have the -vm option set in your eclipse.ini file.
It must be an absolute path and on 2 separate lines:
-vm
<Absolute Path>\javaw.exe
Save your .ini and relaunch Eclipse
One line answer, remove 'C:\ProgramData\Oracle\Java\javapath;' from your path variable. It will start to work.
Most errors with starting eclipse happen due to multiple JRE or JDK version which makes the installer go nuts.
Solution: Go to Control Panel -> Uninstall Programs
If you're running 64-bit java, then uninstall all Java without the 64bit indicator. If 32-bit, then uninstall all that have 64-bit
It works like magic!
What worked for me was having installed adoptopenjdk11 using Chocolatey package manager:
choco install adoptopenjdk11
I tried to download Java on my laptop (which has windows 10) but i keep getting a 1603 error. My computer used to have windows 8.1 and it did not work back then either
I appreciate any advice to solve or work around this problem
I have had this problem. I was able to fix it thanks to a co-worker. The problem started happening after I installed HP Unified Functional Testing (UFT, aka QTP). Installing this product changes the Windows environment variables used by Java. He told me the following: "So change the names of JAVA_OPTIONS, IBM_JAVA_OPTIONS, JAVA_TOOL_OPTIONS to something else (both in system and user variables) and delete any Java folder(in Program Files (x86) or Program Files) which gets installed despite the error. Restart the system and then try installing Java."
Actually, all I did was rename the environment variables and run the installer. This worked.
My answer is not related to win 10, but might help someone who is having similar problem in windows 7 machine and not able to install jre 32 bit version.
the work around to this is once you downloaded the jre, copy the path "C:\Program Files (x86)\Java\jre1.8.0_121\bin\javaw.exe" and paste it under java runtime environment settings which is found -Java Control panel>java>view
I think you downloaded the wrong version. If your laptop support x64 bit software you should download Java 1.8 x64 version.
Here is the link.
https://www.java.com/en/download/manual.jsp
I had this problem for a month now. I tried everything on my windows 8, but I couldn't get the latest java on it. When I tried to install java on an empty computer, the 64 bit version did not go through (error 1603) and I realized the problem didn't come from an old java install and I install 32 bit. it worked on the new computer with windows 7 and on my computer running 8.1.
note: I had deleted all the java versions before going through with it.
To fix java 1603 error you have to follow few simple steps.
First of all remove all old java version.
Then remove some windows update file which might be reason of this
error. Like KB2918614 update.
After that download and Install latest version of java and activate
java in browser. Now everything will be fine you can test the java
version on java website...
For explained and easy solution to java 1603 error follow this link: http://protechguides.com/java-error-code-1603-solved/
I encountered this error on Windows 8.1 and when I checked with Oracle web site, they said that is is not yet resolved, and under investigation. They also showed a link for off-line installation as an alternative arrangement. However, upon investigation of my system, i found out that the available space in C drive was only about 20 MB or so. I cleared my system and provided enough space. When I tried with the extra space, I didn't encounter any error. May be, you could try with a better free space...
First you should close the browser because if any webpage will use Java, it will cause conflict. Then do custom installation, i.e. install in some other folder other than default folder and point environment variable to newly installed Java location. It will resolve your issue.
I'm trying to debug this problem but not sure where exactly i need to replace SWT jar file for Eclipse.
Current System Config:
Eclipse Helios 3.6 - 32 Bit
JDK 1.6
JVM - 32 Bit
Windows 7 - 64 Bit
Error Message:
java.lang.UnsatisfiedLinkError: Cannot load 64-bit SWT libraries on 32-bit JVM
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:194)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:174)
at org.eclipse.swt.internal.C.<clinit>(C.java:21)
at org.eclipse.swt.widgets.Display.<clinit>(Display.java:138)
at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:687)
at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)
at de.vogella.rcp.intro.first.Application.start(Application.java:18)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.Main.main(Main.java:1384)
An error has occurred. See the log file
Workaround:
Link1: Understood the cause of the problem and i tried to replace 64-bit SWT to 32 Bit but i'm not sure whether i'm doing it right ?
downloaded 32-bit file swt-3.6.1-win32-win32-x86.zip
Extracted the zip file
Have files as shown below
copied swt.jar file
navigated to C:\Program Files\eclipse\plugins
removed 64-bit Swt file ( i.e org.eclipse.swt.win32.win32.x86_64.source_3.6.2.v3659c )
placed copied swt.jar file and relaunched
Still throws SAME ERROR
also tried renaming the swt.jar file to org.eclipse.swt.win32.win32.x86_64.source_3.6.2.v3659c
Still same ERROR
Link2: Suggested the alternative solution but couldn't resolve the problem.
Still same ERROR
I really don't want to uninstall 32-JVM and 32-Bit Eclipse and install corresponding 64 Bit versions.
Not an OPTION
Workaround After the paulsm4 and Paul Webster response & i'm confused
When i tried executing this to check JVM, JRE version in Eclipse
package javaVersion;
public class JavaVersion
{
public static void main( String[] args )
{
System.out.println( "JRE Version :" + System.getProperty( "java.runtime.version" ) );
System.out.println( "JVM Bit size: " + System.getProperty( "sun.arch.data.model" ) );
}
}
Output:
1.6.0_31-b05
JVM Bit size: 32
However when i tried on command line for JAVA - VERSION
So my understanding system has 64bit JVM where as Eclispe is reading 32 Bit JVM. So how can i divert system to read 32 Bit JVM ?
Eclipse is launching your application with whatever JRE you defined in your launch configuration. Since you're running the 32-bit Eclipse, you're running/debugging against its 32-bit SWT libraries, and you'll need to run a 32-bit JRE.
Your 64-bit JRE is, for whatever reason, your default Installed JRE.
To change this, first make sure you have a 32-bit JRE configured in the Installed JREs preference. Go to Window -> Preferences and navigate to Java -> Installed JREs:
You can click Add and navigate to your 32-bit JVM's JAVA_HOME to add it.
Then in your Run Configuration, find your Eclipse Application and make sure the Runtime JRE is set to the 32-bit JRE you just configured:
(Note the combobox that is poorly highlighted.)
Don't try replacing SWT jars, that will likely end poorly.
Well, duh :) SWT uses JNI ... and JNI is strictly platform specific.
Use 32-bit libraries with a 32-bit JVM, 64-bit libraries with a 64-bit JVM, make sure the versions match exactly, and don't mix'n'match.
IMHO...
PS:
You can have multiple JVMs and/or multiple Eclipse's co-existing on the same box.
i removed
C:\ProgramData\Oracle\Java\javapath
from my path, and it worked for me.
and make sure you include x64 JDK and JRE addresses in your path.
Just add -d32 to VM arguments in the "Edit launch configuration properties".
Thanks a lot guys!
I overlooked my ECLIPSE VERSION it was 64Bit and 3.6
I had to make sure it's 32Bit Eclipse, 32 Bit JVM so i uninstalled Eclipse & all JVM for clean start. Installed 32Bit JDK1.6 from here and 32Bit Eclipse from here
I just replaced the swt.jar in my package with the 64bit version and it worked straight away. No need to recompile the whole package, just replace the swt.jar file and make sure your application manifest includes it.
I also faced the same problem a long time ago.
Here is the Solution
In Eclipse Click on "Windows"-->"Preferences"---->"Java"---> "Installed JREs"---->Select the JDK, click on "Edit".
Check your JDK path, is it according to your path in environmental variables defined in system.
if not then change it to "path" defined directory.
Check the target definition if you are working with an RCP-SWT project.
Open the target editor of and navigate to the environent definition. There you can set the architecture. The idea is that by starting up your RCP application then only the 32 bit SWT libraries/bundles will be loaded. If you have already a runtime configuration it is advisable to create a new one as well.
I removed C:\ProgramData\Oracle\Java\javapath from my path, and it worked for me.
But make sure you include x64 JDK and JRE addresses in your path.
So , just make sure that you are on the right environment
i.e 32 bit SWT LIBRARIES should match 32 bit JVM , vice versa.
I solved this problem by installing 64-bit jdk ,64-bit jre and finally by adding setting the jdk path in environment variables adn adding jre to the eclipse.
Install a JDK.
It's possible to get Eclipse to run with a JRE, or at least it used to be, but why bother? Eclipse is much happier with a JDK.
Remember that the JRE that is used to run Eclipse does not have to be the JRE that Eclipse uses to run an application.
PS. I'm assuming here that the original poster's problem was getting Eclipse to start, and not (as some other Answers seem to address) getting Eclipse to start an application.
Go to Path C:\ProgramData\Oracle\Java\javapath
(This path is in my case might be different in your case).
Rename the folder ORACLE with other name line ORACLE_OLD.
And Restart the STS/IDE .
This works for me
I removed C:\ProgramData\Oracle\Java\javapath from my path, and it worked for me.
Perfect Answer, Thanks Nikil.
I'm trying to debug this problem but not sure where exactly i need to replace SWT jar file for Eclipse.
Current System Config:
Eclipse Helios 3.6 - 32 Bit
JDK 1.6
JVM - 32 Bit
Windows 7 - 64 Bit
Error Message:
java.lang.UnsatisfiedLinkError: Cannot load 64-bit SWT libraries on 32-bit JVM
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:194)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:174)
at org.eclipse.swt.internal.C.<clinit>(C.java:21)
at org.eclipse.swt.widgets.Display.<clinit>(Display.java:138)
at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:687)
at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)
at de.vogella.rcp.intro.first.Application.start(Application.java:18)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.Main.main(Main.java:1384)
An error has occurred. See the log file
Workaround:
Link1: Understood the cause of the problem and i tried to replace 64-bit SWT to 32 Bit but i'm not sure whether i'm doing it right ?
downloaded 32-bit file swt-3.6.1-win32-win32-x86.zip
Extracted the zip file
Have files as shown below
copied swt.jar file
navigated to C:\Program Files\eclipse\plugins
removed 64-bit Swt file ( i.e org.eclipse.swt.win32.win32.x86_64.source_3.6.2.v3659c )
placed copied swt.jar file and relaunched
Still throws SAME ERROR
also tried renaming the swt.jar file to org.eclipse.swt.win32.win32.x86_64.source_3.6.2.v3659c
Still same ERROR
Link2: Suggested the alternative solution but couldn't resolve the problem.
Still same ERROR
I really don't want to uninstall 32-JVM and 32-Bit Eclipse and install corresponding 64 Bit versions.
Not an OPTION
Workaround After the paulsm4 and Paul Webster response & i'm confused
When i tried executing this to check JVM, JRE version in Eclipse
package javaVersion;
public class JavaVersion
{
public static void main( String[] args )
{
System.out.println( "JRE Version :" + System.getProperty( "java.runtime.version" ) );
System.out.println( "JVM Bit size: " + System.getProperty( "sun.arch.data.model" ) );
}
}
Output:
1.6.0_31-b05
JVM Bit size: 32
However when i tried on command line for JAVA - VERSION
So my understanding system has 64bit JVM where as Eclispe is reading 32 Bit JVM. So how can i divert system to read 32 Bit JVM ?
Eclipse is launching your application with whatever JRE you defined in your launch configuration. Since you're running the 32-bit Eclipse, you're running/debugging against its 32-bit SWT libraries, and you'll need to run a 32-bit JRE.
Your 64-bit JRE is, for whatever reason, your default Installed JRE.
To change this, first make sure you have a 32-bit JRE configured in the Installed JREs preference. Go to Window -> Preferences and navigate to Java -> Installed JREs:
You can click Add and navigate to your 32-bit JVM's JAVA_HOME to add it.
Then in your Run Configuration, find your Eclipse Application and make sure the Runtime JRE is set to the 32-bit JRE you just configured:
(Note the combobox that is poorly highlighted.)
Don't try replacing SWT jars, that will likely end poorly.
Well, duh :) SWT uses JNI ... and JNI is strictly platform specific.
Use 32-bit libraries with a 32-bit JVM, 64-bit libraries with a 64-bit JVM, make sure the versions match exactly, and don't mix'n'match.
IMHO...
PS:
You can have multiple JVMs and/or multiple Eclipse's co-existing on the same box.
i removed
C:\ProgramData\Oracle\Java\javapath
from my path, and it worked for me.
and make sure you include x64 JDK and JRE addresses in your path.
Just add -d32 to VM arguments in the "Edit launch configuration properties".
Thanks a lot guys!
I overlooked my ECLIPSE VERSION it was 64Bit and 3.6
I had to make sure it's 32Bit Eclipse, 32 Bit JVM so i uninstalled Eclipse & all JVM for clean start. Installed 32Bit JDK1.6 from here and 32Bit Eclipse from here
I just replaced the swt.jar in my package with the 64bit version and it worked straight away. No need to recompile the whole package, just replace the swt.jar file and make sure your application manifest includes it.
I also faced the same problem a long time ago.
Here is the Solution
In Eclipse Click on "Windows"-->"Preferences"---->"Java"---> "Installed JREs"---->Select the JDK, click on "Edit".
Check your JDK path, is it according to your path in environmental variables defined in system.
if not then change it to "path" defined directory.
Check the target definition if you are working with an RCP-SWT project.
Open the target editor of and navigate to the environent definition. There you can set the architecture. The idea is that by starting up your RCP application then only the 32 bit SWT libraries/bundles will be loaded. If you have already a runtime configuration it is advisable to create a new one as well.
I removed C:\ProgramData\Oracle\Java\javapath from my path, and it worked for me.
But make sure you include x64 JDK and JRE addresses in your path.
So , just make sure that you are on the right environment
i.e 32 bit SWT LIBRARIES should match 32 bit JVM , vice versa.
I solved this problem by installing 64-bit jdk ,64-bit jre and finally by adding setting the jdk path in environment variables adn adding jre to the eclipse.
Install a JDK.
It's possible to get Eclipse to run with a JRE, or at least it used to be, but why bother? Eclipse is much happier with a JDK.
Remember that the JRE that is used to run Eclipse does not have to be the JRE that Eclipse uses to run an application.
PS. I'm assuming here that the original poster's problem was getting Eclipse to start, and not (as some other Answers seem to address) getting Eclipse to start an application.
Go to Path C:\ProgramData\Oracle\Java\javapath
(This path is in my case might be different in your case).
Rename the folder ORACLE with other name line ORACLE_OLD.
And Restart the STS/IDE .
This works for me
I removed C:\ProgramData\Oracle\Java\javapath from my path, and it worked for me.
Perfect Answer, Thanks Nikil.