How to install JRE 8.0 on eclips - java

I am trying to install jre 8.0 on eclipse neon, when I go preferences>java>Installed JRE's>add>standardVM I don't know what it is asking for when it requires a JRE home, it needs a specific type of directory and I don't know what that is. I tried downloading the JRE from elipse's website, but when I put that in it doesn't work. Any help is appreciated.

Eclipse Neon has a dependency on Java8. And atleast JRE needs to be installed. However for most development efforts a JDK environment is recommended. You want to download and install Jdk8 or JRE8 from Oracle site and setup the Java_Home and Path environment variables in Advanced System Settings.
Test that you have java installed correctly by running java -version on the command prompt.
If done correctly, eclipse will automatically detect your jre.
If the project needs the jre to be identified under Preferences as you were trying, you need to check where jre is installed on your machine. Normally it is either "C:\Program Files\Java\jre-version_no" or "C:\Program Files\Java\jdk-version_no\jre". Browse the location, give it a unique name (if it automatically doesnt detect) and it should let you add it.

download and install Jdk8 or JRE8 from Oracle site and setup the Path in environment variables then test it using command prompt, if it's working properly then ur good to go. Go to add external jar and u will find it as system jars, if u have multiple jdk versions then it will show u all the list, u just add the version u like ( I guess jre8). It's very simple steps, ask me if it doesn't work out. I can help u in remote installation also

Related

Eclipse finds Java from CMD prompt but not from desktop click

I have multiple versions of Java installed on Windows 7 Home Premium 64-bit system. In order to install
Eclipse Java 2018-12
I have had to install the Java 11 JDK from the Oracle website. Despite setting JAVA_HOME and updating PATH in environment variables the only way to install and also run this version of Eclipse was to open a command prompt and
C:>set path=c:\program files\java\jdk11.0.1\bin
and then run Eclipse installer or installed instance.
The problem persists if I reboot my computer.
I want to be able to start eclipse by simply clicking on the desktop icon link.
The error I get when I try to run eclipse from the desktop link is:
Version 1.7.0_79 of the JVM is not suitable for this product. Version 1.8 out greater is required.
My C:\Program Files\Java\
contains folders
jdk1.0.7_79
jdk-11.0.1
jre7
I think I need all of these because I have some programs which I think retire java 7 so I don't think uninstalling java 7 is an option and don't think java 11 would replace it, or should I just get rid of java 7, is that what's causing the problem despite environment variables set correctly?
How can I fix this problem?
Thanks.
Add c:\program files\java\jdk11.0.1\bin to your Windows Environment PATH
The system was running C:\Windows\System32\javaw.exe
I fixed it by adding the Java 11 bin directory at the beginning of the Path environment variable instead of at the end of the string, separated by a semicolon.
First set JAVA_HOME then update path in environmental, refer screenshots attached.

Netbeans would not find compatible jdk while installation

Netbeans would not find compatible jdk while installation while JDKs are located at C:Java and the files are:
jdk-8u73-windows-i586
jdk-8u73-windows-x64
jdk-8u141-windows-i586
From NetBeans Installation Instructions
The default location in Windows is C:\Program Files\Java\jdk1.7.0_10 or similar.
If your JDK is at C:\Java you just have to:
re-install the JDK under the default Netbeans location, or
specify your custom location during the installation wizard
Since I've run into this problem and this Q/A came up in my search, here is the solution that I found worked for me on the Windows platform.
I had to set up an system environmental variable named JAVA_HOME that pointed to the JDK directory.
JAVA_HOME=D:\Program Files\Java\jdk1.8.0_144
Even after this change, I still ran into the "An unknown error occured while validating path."
Right-click on the NetBeans install software and select "Run as Administrator...". It looks like running the installer under your normal account, even though it may have admin rights, is not enough to scan the "\Program Files" folder and find the JDK.
*Delete your old java files.
*Download jdk file from.
https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
*install new jdk version.
*Then install NetBeans //Now it will automatically identify your jdk and no need for manual selection...

I downloaded Eclipse IDE for my developments and throws back this [duplicate]

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

Get Oracle Java 1.8 in windows without installing it

Is it possible to get Java in zip format? I don't want to install it by getting .exe file.
Is there any zip version of Java 1.8 so that I can download it and extract it and start using it in my Windows machine (64-bit processor)?
You can extract the JDK folder from the Installation EXE.
Check this link for the steps. The post was for JDK 1.7 it will work for JDK 1.8 also
Do the following.
Steps
Download JDK from Oracle
Download and Install 7-zip from here
Open installition exe using 7-Zip
Extract the tools.zip
Extract the content of tools.zip to a folder (e.g. c:\jdk).
Open the extracted folder in cmd prompt.
Execute for /r %x in (*.pack) do .\bin\unpack200 -r "%x" "%~dx%~px%~nx.jar" command
Set JAVA_HOME to the jdk (e.g c:\jdk) folder.
Add %JAVA_HOME%/bin to the PATH env variable.
Testing
Run the following command to check the installation, it will print the version of JDK.
c:> javac -version
javac 1.7.0_51
NOTE: Tested with JDK 1.7 and 1.8
Update 1
Edited the answer to add the steps in the answer itself instead of the link to a blog post.
Update 2
For 64-Bit please check unpack-jdk-x64.bat by grabantot
I was looking for a solution to this as well. I'm not sure why the OP wanted to do this. I'm just trying to get a newer version of java for new development while not interfering with an older Java install which a legacy application requires (I'd like to update the legacy app, but it's not an option, now)
I think the hack I am going to try is this:
Install 1.8
Take a copy of the install folder
Uninstall 1.8
Reinstall / Repair 1.7
restore the copy of 1.
I'm sure if I had a better understanding of what the install is doing, this would not be necessary.
I had a spare virtual machine hanging around (if not you could build one or maybe even download one) so I:
installed the Oracle JDK in the guest
copied the jdk folder from the guest to the host
added a JAVA_HOME environment variable.
The operating systems obviously have to be close (not sure how close, I used Windows Server 2008 64 bit guest on a Windows 10 64 bit host and it seemed to work).
Was a quick fix for me as I didn't want a full install and wanted to remove it afterwards.
If you do not have permission to unzip zip file then you cannot install java .
As java does not need installation for running . You just need to give path of java.exe where it is located .
In Windows it is located in C:\Program Files\Java\jdk1.8.0_05\bin
For a solution you can run installer on any machine that you have permission and just copy and paste the folder of java to anywhere in your system (Machine where you have administrative rights problem) . and just set the path as by opening command prompt as set path="C:\Program Files\Java\jdk1.8.0_05\bin"
java will be working as you want
The following worked for me (I had JDK 1.8 installed and needed the 32 bit version as well):
Verify the current version with java -version
Assuming a different version (minor or major is being installed), download the relevant JDK installable from Oracle and run it. In the
first dialog, specify a different folder than the default location
(might work with the default one as well), then select Next. It will
extract the files there in this folder, then it will asl for the
folder where the JRE is to be installed. Simply close the installer,
now you should have just the JDK in the specified folder.
Rerun java -version, it should give you the same version as earlier.
Worst case, if it shows the newer version, go to your system path (Right click My Computer (or This PC) -> Properties -> Advanced
system settings -> Advanced tab -> click on Environment variables
button) and remove the Oracle javapath entry (From the Path variable
in the bottom part of the window). The add the older java version's
bin folder to the path variable in the beginning.
for /r %x in (*.pack) do .\bin\unpack200 -r "%x" "%~dx%~px%~nx.jar"
Is this working for linux shell scripting , I got syntax error for the above.

How to make Eclipse search for JDK on another drive

So I've been getting this error when trying to start Eclipse:
"No java virtual env found after searching the follow locations:
/absolute/path/to/jre6/bin"
I checked the control panel and I got JDK (Update 21 / 64-bit) installed.
However, JDK is installed is installed on my primary drive (the sdd with Windows on) whereas Eclipse is unzipped and executed from my secondary hard drive.
How to I tell eclipse to find Java on my c-drive instead of the d-drive where it's located?
Thanks in advance!
I would suggest you uninstall all versions of Java you have installed and then installed the one you want to use.
Another option is to tell eclipse which Java to use. For example: eclipse -vm c:\path\to\jre\bin\javaw
Locate the eclipse.ini file and ensure that the variable -vm is correct (
FAQ How do I run eclipse):
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.

Categories

Resources