Eclipse linking JDK - eclipse

I have extracted Eclipse on my C partition. I got windows 7 64 bits. Eclipse is 64 bits. But JDK is 32 bit. Once I run eclipse the pop menu is saying it can't find JDK or JRE on some sort of path. Once I run Eclipse from USB drive it works fine. What is the problem? Should I specify envorinmont variables, set classpath or something? What exactly should I do?
Best regards

Why don't you get the 64bit JDK?

Did you download any java jdk on your pc? To check, open a command prompt and launch the command java -version then javac -version If one of them fails, you need to download java jdk from oracle's website

1. If you are using windows then i will recommend you to download Windows x86 jdk-7u5-windows-i586.exe.
2. Install it... in C:\Program Files\Java\
3. Include this in your System PATH C:\Program Files\Java\jdk1.7.0_05\bin .
3. Then type java -version in your command prompt, and if you get the version of your JDK then, you have properly installed the java, and your path is properly configured.
4. Extract your Eclipse folder from the Eclipse.rar downloaded from Eclipse site.
5. You can place this Extracted Eclipse folder anywhere in the disk, but i recommend you to store it in c: drive as this C:\Program Files\eclipse
6. Now i think it should work.............

In a command prompt, a java -version should show the details of the installed JVM.
For example, a jdk7 32-bit version would show this:
java version "1.7.0_05"
Java(TM) SE Runtime Environment (build 1.7.0_05-b06)
Java HotSpot(TM) Client VM (build 23.1-b03, mixed mode, sharing)
A jdk7 64-bit version would show this:
java version "1.7.0_05"
Java(TM) SE Runtime Environment (build 1.7.0_05-b06)
Java HotSpot(TM) 64-Bit Server VM (build 23.1-b03, mixed mode)
However, the standard JDK installation copies the java.exe and javaw.exe on the c:\Windows\System32 folder, which could be the ones that Eclipse looks for. This could get really messy if you've tried to re-install different JDK versions and you loose track of the last one you installed (or like me, if you install different versions for backwards support on some legacy projects).
To be 100% sure of the JVM used by your Eclipse, just modify the eclipse.ini file located in your eclipse/ folder so it points to the exact JVM you want. For example, add these lines if you want to use your jdk7 64-bit (check if the same folder applies):
-vm
C:\Program Files\Java\jdk1.7.0_05\bin\javaw.exe
Start Eclipse, and it should work fine.
Go to this site fore more info on the eclipse.ini configuration.

this tutorial is the only thing that worked for me with Win 64 bit.
Summary:
install
32 bit eclipse
32 bit JDK (NOT JRE)
32 bit Android SDK
Add Java to your PATH environmental variable
open eclipse.ini and add a line pointing to the JDK
I uninstalled all versions of Java from my system first.
http://envyandroid.com/archives/38/getting-started-with-android-dev-environment

Related

Anypoint Studio 7.1 start-up error

I am trying to experiment with Mule Runtime 4 & Anypoint Studio 7.1.
I got the downloadable from -
https://mule-studio.s3.amazonaws.com/7.1.1-GA/AnypointStudio-for-win-64bit-7.1.1-201803182216.zip
while starting up AnypointStudio.exe, I keep getting the error message -
A JDK must be installed in order to run Anypoint Studio. Please install a JDK and try again.
But I do the required version of JDK installed in my machine, as per https://docs.mulesoft.com/anypoint-studio/v/7.1/faq-jdk-requirement
Here's the output from java -version
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
Can someone help identifying the issue?
Make sure Java8 was installed in your system and Update AnypointStudio.ini file with below lines.
-vm
C:\Program Files\Java\jdk1.8.0_111\bin\javaw.exe
#larsen
I think you have more than one version of java installed in your laptop, Please use the JDK 1.8 with the latest update and remove or uninstall all the older versions of it.
Please don't forgot to configure the JAVA HOME and Path environment variables in your laptop user account. enter image description here
and if still the problem exists, then uninstall all the versions of java and clear the temp folder of your laptop (or restart your laptop) and then try the fresh installation of jdk and jre 1.8 version, this kind of error comes when the jdk is not installed properly in your system.
Above solution works but there is another solution which is to add JAVA_HOME and PATH variables into Window's System variables. Make sure to put %JAVA_HOME%/bin as first variable of PATH variables' value.
By doing that you don't need to change any default configuration .
Studio7 try to find out JDK path from first variable of "PATH" values under system variable instead of user variable under Environment variables .
not true, you can use as many JVM as you wish,
just make system path to javaw.exe and server\jvm.dll
..;D:\jdk1.8\jre\bin;D:\jdk1.8\jre\bin\server;D:\jdk1.8\bin;...
and JAVA_HOME D:\jdk1.8 and fix anypointstudio.ini accordingly above described to your path of javaw.exe in my case D:\jdk1.8\jre\bin\javaw.exe
I think the solid answer is, Anypoint Studio 7+ only supports OpenJDK. I have both Oracle and OpenJDK installed on my machine. I had to bring OpenJDK and JRE setting up the order in Environment variables above Oracle JDK Path.
IF you have only OpenJDK, no changes to environment variables is required.
once you reinstall AnyPointStudio its not working plz follow the steps below..
step:1 Download AnyPointStudio (it should be extract in c:drive only )
step:2 download JDK8 Version(it will support JDK8)
after these two steps it will work successfully

version 1.7 of the jvm is not suitable for this product. version 1.8 greater is required for eclipse nano in window

I am trying to launch Eclipse Nano in Windows 7, but getting the error:
Version 1.7 of the JVM is not suitable for this product. version 1.8 greater is required for Eclipse Nano in Windows
I already have Java 8 installed on the system
Simply download 1.8 JDK from Java SE Development Kit 8 Downloads install it, then copy the jre folder & paste it in:
"C:\Program Files (x86)\EclipseNeon\"
Then rename the folder to "jre", start the eclipse again it should work.
sudo /usr/sbin/update-alternatives --config java
and select the jvm 1.8
I faced the same issue (Windows 10). You need to set the "JAVA_HOME" system environment variable to point to JDK 8 folder and edit the "Path" system environment variable to have a new path to JRE 8's bin folder, this should be at the top of the list.
I too got the same error while installing
Possible reason for the error - The eclipse version, you are installing and the Java version should be of same bit, i.e. either 32 bit or 64 bit
Solution: I have downloaded both the java for 64 bit and 32 bit and installed, now my problem is gone.
Please let me know if it works for you.
When you download the latest eclipse, and extract it, you can find the folder named eclipse-installer with eclipse-inst file inside it. Instead of double-clicking it to start installation, just navigate to the folder in terminal and run ./eclipse-inst command. It does the entire installation for you. It worked for me and hope who also got the same problem(version 1.7 of the jvm is not suitable for this product. version 1.8 greater is required) gets solved. :)
On a Windows system I had the same problem.
Although I had only Java 1.8 installed, I found that I also had a 1.7 upgrade file installed too (which didn't get uninstalled automatically when I installed 1.8).
Uninstalling this upgrade file allowed me to install Eclipse IDE.
I had the same issue and I had a different solution to this problem.
Though I set the JAVA_HOME to 1.8 (Both through CMD and environment variables), the error was persisting.
So I opened CMD prompt, typed:
java - version
to find out 1.7 was the version my system was set to. Until then I had no clue from where it was fetching this version.
And then I changed it to 1.8 using this command:
set path=C:\.....eclipse\jdk1.8.0_141-b15\bin
AND IT WORKED!
Recheck if it is set to 1.8 with the same command:
java -version
You should be good to go now!
if it's a 64-bit Eclipse. You'll need to explicitly download and install the 64-bit Java 8 or later.
download it from here
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
tips for windows users
Version 1.7 of the JVM is not suitable for this product. version 1.8
greater is required
user get above error message because they had multiple jdk version or they do not have latest version of jdk installed , even if you install latest version of jdk and you if you have not removed old version of jdk like 1.7 you will get the above error message , so better to get rid of old version of jdk and jre etc.
-> ignore this step if you have insallted latest version of jdk already
download 32 or 64 bit latest jdk from : https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
-> go to C:\Program Files\Java and look for old version of jdk , let say if you have 1.7 versions of jdk delete them so that you are left only with latest version , you can remove old versions of jre too here just by deleting.
-> next run eclipse you will not get v1.7 message
Find the JVM
If a JVM is installed in the eclipse/jre directory, Eclipse will use it; otherwise the launcher will consult the eclipse.ini file and the system path variable. Eclipse DOES NOT consult the JAVA_HOME environment variable.
To explicitly specify a JVM of your choice, you can use the -vm command line argument:
eclipse -vm c:\jre\bin\javaw.exe ''start Java by executing the specified java executable
eclipse -vm c:\jre\bin\client\jvm.dll ''start Java by loading the jvm in the eclipse process
Go to Eclipse directory, find and open eclipse.ini configuration file then modify below parameter to your desired version, it will work.
-Dosgi.requiredJavaVersion=1.8
It worked for me
Eclipse will consider the version that is mentioned in eclipse.ini file, this error
means that your installed java version (in environment variable) and the mentioned java
version in eclipse.ini file is not matching.
You may just change the java version there (it will be in eclipse-installation-dir).
Change the property as below:-
-Dosgi.requiredJavaVersion=
Updating below line in eclipse.ini worked for me
-Dosgi.requiredJavaVersion=1.8
Two things:
Check this question here as it's similar and has some good pointers Eclipse - no Java (JRE) / (JDK) ... no virtual machine
Also, get the latest JRE and JDK from Oracle vs from java.com http://www.oracle.com/technetwork/java/javase/downloads/index.html
Today I meet the same question. I download the file that named "eclipse-inst-linux64.tar.gz". When I open the eclipse, it shows "Version 1.7.0_121 of the JVM is not suitable for this product. Version: 1.8".Then execute
cd /usr/bin/
sudo ln -s /Your_JAVA_PATH /usr/bin/java
Then you can install eclipse.
Make sure java and eclipse versions are same(32bit or 64bit)
Try running eclipse-installer as administrator(this worked for me)
If you need to skip this step just simply change Required Version number, ex:
open with any text editor instalation path/AptanaStudio3.ini
and change
-Dosgi.requiredJavaVersion=1.8 to -Dosgi.requiredJavaVersion=1.7
This is just for skipping this step.
I had both 1.7 and 1.8 in path and 1.7 was on top and 1.8 below in Pah, so i moved 1.7 below 1.8, thats it it worked.
Go to Oracle's website and download the newest version of Java JDK. (https://www.oracle.com/java/technologies/javase-downloads.html)
Install the program on your computer.
Remove all old environment variables related to Oracle and Java.
Set the environment variables related to the new installation all the way to the bin folder. (include the bin folder in the environment variables section)

Eclipse is not working properly

I clicked on eclipse and I got this error:
Failed to load JNI Library "C:\Program Files (x86)\Java\jre7\bin\client\jvm.dll"
The java version is up to date and the path is correct. I'm not sure how to fix this. I'm using Eclipse IDE Java Developer
I think you may not have downloaded and installed JNI(Java Native Interface). by the looks of it you have the JRE(Java Runtime Environment) and that's where the path is set. Try downloading Java Native Interface and set path to that. Just an idea
Check whether your eclipse and java are of the same version i.e both 32bit or both 64 bit.
You can try on the command line:
java -d64 -version
If it's not a 64-bit version, you'll get a message that looks like:
This Java instance does not support a 64-bit JVM. Please install the desired version.
To check eclipse :
Open eclipse.ini file and observe the following 4th line
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
This shows eclipse is 32 bit

How Do I make the Install4j IDE to upgrade to Java7 instead of Java6

I have upgraded to Java7 recently.
I had my install4j Project file in Java6.
Now in the Install4j IDE, I go to Media wizard and download 1.7 JRE's and select them for Windows. (I have window 7 64 bit.)
But When I go the Installer tab in IDE , where for some of the screens I have my custom code which is compiled in Java7.
It gives an error for the IDE java version lower than the compiled version(for those class files).
The Common Location where is the JRE for 1.6 was downloaded C:\Program Files\Common Files\i4j_jres
But the JREs for 1.7 somehow are never downloaded in the common location.
How Do I make the Install4j IDE to upgrade to Java7 instead of Java6.
Thanks
Sony
We had the same problem as you, so we just swapped out install4j's built-in JRE with the one we used to compile our custom code.
i.e. - replace "C:\Program Files\install4j5\jre" with the jre you use to build your custom actions.
Under General Settings->Java version, change the minimum version to 1.7

32 bit Java on 64 bit Windows 7 for running JBoss JSP Editor in Eclipse Juno

I installed JBoss Tools on my Eclipse Juno. It worked, then when I click the tab design/view/ whatever it is except the source on my JSP window, It said that JBoss tool for JSP editor cannot run on my 64-bit Eclipse, JRE7, and Windows 7.
I've been browsing all over the place, some forums say you have to change your JRE to 32-bit. After that I installed JRE7 32-bit, restart and I tried to see the Java on Control Panel.
When I clicked Java tab on Control Panel, it said
Couldn't open \lib\i386\jvm.cfg.
I tried to checked on CMD, I typed java -version then it displayed
Unable to load native library: Can't load IA 32-bit.dll on AMD 64-bit platform.
I advise you to uninstall all Java instances, then start again.
Install 64-bit JDK first, set up your normal development tools to use it. Then install the 32-bit JDK but don't install the public JRE. Then configure a separate instance of Eclipse to use the 32-bit JDK. (I'd keep a separate, normal 64-bit Eclipse around, because 32-bit means you are limited to about 1.5Gb of heap for Java)