ADT Bundle can't find Java - java

When I open adt-bundle-windows-x86_64-20131030 and click on the Eclipse.exe application to install it I get the message; A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. No Java Virtual Machine was found after searching the following locations: C:\users\username\desktop\development\adt-bundle-windows-x86_64-20131030\eclipse\jre\bin\javaw.exe
javaw.exe is your current PATH.
I do have JDK, and JRE on this computer, I need them to view the emulator for my job. I have tried uninstalling and reinstalling Java with the same results. What can I do to fix this problem?

You will have to put Java in your classpath, so Eclipse knows where it can find Java. See here: http://docs.oracle.com/javase/tutorial/essential/environment/paths.html for info on how to do this.

install 32 bit version of jdk from oracle website

put the path of your java bin directory under Environment variables.
System->Advanced System Settings->Environment Variables->path
Open command prompt. use java and javac commands to know if you have successfully installed java and compiler.
if it doesn't help, this question has a lot of helpful answers
Eclipse - no Java (JRE) / (JDK) ... no virtual machine

From what you said:
"'java' is not recognized as an internal or external command, operable program or batch file"
Your java may not have been installed correctly, or, it was installed, but you did not set path to it correctly. It is not a problem with ADT, any of your programs that need Java will not be able to find it.

Related

Where can I find my java installation when where java gives nothing?

It's definitely installed, I can run Minecraft. But I'm trying to run a .jar file and Windows 11 is asking "How do you want to open the file?" And java compiler doesn't show up. btw I've treid where java, it said java didn't exist on the computer
UPDATE: I solved the problem but not the issue, there were some mods that were incompatible with eachother
You could try to find it out via printing your PATH.
On Windows: Open the command line via
Start -> CMD
Paste in
echo %PATH%
There you should be able to find the java path. Otherwise try to search for JRE.
By the way it is not always 100% sure that you have the java runtime and java compiler installed.
JRE = Java Runtime Environment for executing .jar
JDK = Java Development Kit for compiling java files and creating .jar files

Cannot install Ecplise on Mac:A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse [duplicate]

I have formatted my Mac due to some storage issues. Before this, I used Eclipse in a proper way. Now i have installed the JDK
Then, i have installed Java
Until now everything seems to be correct but when I open the Eclipse installer...
What can I do to fix this? I need to work with this the soon as possible.
Thanks
Eclipse on macOS will not start with Java 14 installed, this is being tracked in Eclipse bug 561273.
Installing Java 8 as well does not help. You need to remove the Java 14 install. You could use the Java 13.0.2 release instead.
Eclipse have determined that the root cause of this issue is a change in Java 14 which is described in this bug report JDK-8238225. The fix for this should be in Java 14.0.1
Update: Eclipse runs fine with Oracle Java 14.0.1 so the issue has been fixed.
I also asked this question which was closed, that's why I answer what I have found out: Eclipse will not install on Mac OS Catalina 10.15.4, saying the above error message
Failed to create the Java Virtual Machine.
Deinstalling jdk and install an older one wouldn't help on its own because Eclipse is refusing to install in the first place (as mentioned above). What I have done:
i´ve installed an JDK with boost (you can try several, mine worked with Version 13)
I edited the installer:
Download the dmg file
convert the dmg-file with "hdiutil convert /dev/disk3s1 -format UDRW -o devimage"
mount the converted dmg-file with: "hdiutil attach -owners on devimage.dmg -shadow"
Edit the /Volumes/Eclipse/Eclipse.app/Contents/Info.plist: there is a section which is commented and there you can try the jdk version. You have to give the full path to the java executable, for example:
<string>-vm</string><string>/Library/Java/JavaVirtualMachines/jdk-13.0.2.jdk/Contents/Home/bin/java</string>
Then my eclipse started from the (already) mounted Eclipse image without complaining
I had the same issue myself a while back. In your Eclipsepedia it provided an example of what the eclipse.ini file looks like when your trying to specify a JVM. So just change the eclipse.ini file and then make sure that you have all of the correct documents in that path to match the example.

Vscode extension error, java runtime could not be located on window subsystem for linux

I have installed the java runtime in the window subsystem for Linux (Ubuntu), and the Vscode is installed on the windows 10 system.
I did not install java runtime in windows 10 system. When I use vscode to edit java, it usually pop up a notice says the "java runtime could not be located".
I have point the vscode "java.home" to the java jdk directory of window subsystem linux file folder, which is C:\\Users\\Myusername\\AppData\\Local\\Packages\\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\\LocalState\\rootfs\\usr\\lib\\jvm\\. In the folder, it has:
java-8-openjdk-amd64 directory, and three files
.java-1.8.0-openjdk-amd64.jinfo,
default-java
java-1.8.0-openjdk-amd64.
But however, the vscode still pop out the notice that the java.home variable defined in VS Code settings does not point to a JDK.
Can anyone let me know how to set up the vs code properly so that it can locate the JDK file in the window subsystem for Linux (WSL)?
Thanks in advance.
It won´t work like this because you are trying to use a jdk builded for linux on windows.
It is the same as if you download the jdk for linux and try to execute on windows.
As for the solution, unfortunately there is no solution right now.
However you can call your java and javac directly on terminal using WSL
wsl javac
You can´t point the java_home using wsl.
Maybe in the future the guys from Microsoft can make the trick. I hope so.

Eclipse not recognizing JVM 1.8

Still trying to get Eclipse IDE to work and running into Incompatible JVM error. I followed the steps here: I installed Java 7 but Eclipse keep saying that 1.6 is not suitable for this product
But unfortunately to no effect. Running OSX 10.9.5 and uninstalled the out-of-the-box version of Mac. The new version of Java seems to show up in the System Preferences. Please see attached screen capture. I've even done some of the basics like restart my computer, etc. Maybe there are other modifications I need to make to other files. I'm comfortable with Terminal but new to Eclipse and Java.
I have had the same problem as noted above. I could not get Eclipse to install because of Java incompatibilities. The sequence I followed goes like this:
Upgraded to MAC OS Sierra
Downloaded the Eclipse installer but was prompted that I needed to instal a legacy Java.
Installed Java 1.6
Was unable to install Eclipse and was prompted that I needed Java 1.7 or greater. Downloaded and installed Java 1.8
Ran the terminal code 'java -version' // this will check your jre version. This showed returned Java 1.6 despite the fact that I had upgraded to 1.8. The Java version listed in the Java control panel said 1.8
Tried multiple downloads of eclipse and Java and multiple restarts always with the same result.
Visited the Oracle web page noted above:
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html I could not find the above reference to 8u73 and 8u74 but I did find and option to download 1.8.0_12. I did this. It installed without difficulty, and then I was able to install Eclipse without difficulty.
This took hours of my time. I hope this proves useful.
OK, so I don't really know what the problem was, but I simply fixed it by navigating to here http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html and installing 8u74 instead of 8u73 which is what I was prompted to do when I would go to "download latest version" in Java. So changing the versions is what did it in the end. Eclipse launched fine, now. Thanks for everyone's help!
edit: Apr 2018- Now is 8u161 and 8u162 (Just need one, I used 8u162 and it worked.)
JRE is a Run-Time Environment for running Java stuffs on your machine. What Eclipse needs is JDK as a Development Kit.
Install the latest JDK (and not JRE) from http://www.oracle.com/technetwork/pt/java/javase/downloads/jdk8-downloads-2133151.html and you should be good on Mac!
Open up terminal and check what java version is currently set in your path variable.
You can do that by typing in your terminal
java -version // this will check your jre version.
javac -version // this will check your compiler version
If this shows incorrect java version but you have installed java 1.8 then you have to set path variable to the newer version of java.
To do that do add the line:
export JAVA_HOME=/path/to/java/jdk1.x
to ~/.bash_profile (same as /Users/username/.bash_profile)
Then do this from the terminal to set the new variable
source ~/.bash_profile
Also what's your eclipse.ini set to ?
-Dosgi.requiredJavaVersion=1.7
EDIT:
Please open up terminal and type
find / -name "java" // This should find all folder named java on your file system.
Also how did you install java in the first place ?
Echoing the answer, above, a full install of the JDK (8u121 at this writing) from here - http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html - did the trick. Updating via the Mac OS Control Panel did not update the profile variable. Installing via the full installer, did. Then Eclipse was happy.
Here are steps:
download 1.8 JDK from this site
install it
copy the jre folder & paste it in "C:\Program Files (x86)\EclipseNeon\"
rename the folder to "jre"
start the eclipse again
It should work.
For some weird reason "Java SE Development Kit 8u151" gives this trouble. Just install, "Java SE Development Kit 8u152" from the following link-
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
It should work then.

compilation of java program

I have JRE 6 in my PC (Windows XP) but when I compile a program in the command prompt it shows javac is not recognised as internal or external command. Which software is needed to compile a Java program?
You need to download and install a JDK, not a JRE.
As a (very rough) explanation, the JRE contains just the Java Virtual Machine, whereas the JDK contains not only the JRE but also the compiler (javac), some debugging tools (javap, jvisualvm, ...), extra libraries and the API documentation.
See also:
What is the difference between JRE and JDK?
as recommended by dogbane, you can follow the Java Hello World for Windows Tutorial.
I suggest you run through the steps of the Hello World! Tutorial.
As per the instructions:
Download JDK6. (Make sure you download the JDK, not the JRE.)
Update the PATH variable to be able to conveniently run the JDK executables such as javac from any directory without having to type the full path of the command
JRE stands for Java Runtime Environment. It allows you to run already compiled java programs. To compile your own programs, you need JDK which stands for Java Development Kit. You can download it at JDK Downloads Page.
You need to install JDK-6 (Java Development Kit) which contains javac Java compiler. JRE does not contain it.
Instead of a simple JRE, you'll need a full JDK. As an example, youc an download sun one here : http://www.oracle.com/technetwork/java/javase/downloads/index.html#need (and don't forget to select "download JDK").
JDK is needed to develop applications whereas JRE is enough to run applications.
In other words JRE is enough to run a application (i.e) it includes java.exe and doesnot contain javac.exe
JDK contains both java.exe and javac.exe
There are also other chances that you dint set your class path properly.

Categories