I'm installing Tomcat 8. It is requiring a JRE:
I installed OpenJDK for Windows. I did some Googling and got conflicting results of whether or not the JDK has the JRE inside it. I also got something that said the JDK is the JRE, so I'm confused.
I did standard installation of OpenJDK. As far as I can tell.
The JDK comes bundled with a JRE. This means that whenever you install the JDK it also installs a JRE.
As to where is the JRE. Please look inside the folder where JDK is installed.
Normally for windows the path looks something like:
C:\Program Files\Java\jdk8u222-b10\jre
However, it is still possible to install the JRE separately also.
Update:
If your installation doesn't look like this, you may be able to do
echo %JAVA_HOME%
or
which java
To get the location of your jre. OP says the jre location was the same as JAVA_HOME, not the bin folder...
Related
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 have a jdk1.8.0_92 installed, which is also added to the Java/Installed JREs in Eclipse Neon. The "bin" subfolder containing the java compiler and all other components of a standard JDK is there. Still, when I try to assign this JRE as a "Server Runtime Environment" of a GlassFish server, Eclipse complains it needs a JDK and not a JRE. An older jdk1.7.0_55 folder does not produce this problem, it is considered to be a JDK by Eclipse, and not a JRE. What may be missing from the 1.8 installation, by which Eclipse categorizes it as a JRE? Image of the error message :
Okey, check this
glassfish\config\asenv.bat
where java path is configured
REM set AS_JAVA=C:\Program Files\Java\jdk1.8.0_92\jre/..
set AS_JAVA=C:\Program Files\Java\jdk1.8.0_92
It's not a duplicate. I would like to get current JRE version while program is executing.
To test result I've installed JDK 8.91 (without JRE 8.91 installation) and JRE 8.77. Also I've created JRE_HOME, JAVA_HOME variables, excluded Path variable with JDK folder.
My Tomcat uses JRE so I would like to get current JRE version before I will launch it. I found solution like:
System.getProperty("java.version")
After executing
System.out.println(System.getProperty("java.version"))
I get result 1.8.0_91 Instead of 1.8.0_77, which I wanted to get.
However, Oracle documentation gives the definition that this is JRE version.
Link:http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/System.html#getProperty%28java.lang.String%29
How can I fix it?
When you run a Java program, it always runs on a JRE (Java Runtime Environment). You cannot run a program on the JDK directly.
When you install Oracle's JDK, a JRE is included, you can find it in the jre directory in the JDK installation directory.
When you install Oracle's JDK, you get an option to install a "public JRE". This is a JRE that is installed separately from the JDK itself, and is used by browser plug-ins. You need this only if you want to be able to run Java applets in your browser.
I have ADT Installed. v23.0.2.
I tried to import simple java project, but found no installed JRE to compile the code. I then installed JDK & JRE from Java SE downloads. I yet don't see any JRE in the list. Anything am I missing? any hooks ?
If it does not find it "automagically" then you need to "Add" it or "Search" it. Most likely though, when you installed the JRE, it was not properly added to the "path" or another install problem.
See this post:
How to install JRE 1.7 on Mac OS X and use it with Eclipse?
Chances are "Search" will do what you need.
I want to use jarsigner.exe on a machine where I don't have JDK installed or JAVA_HOME set.
We are using installanywhere to install our product and inside that we have bundled JRE. JRE doesn't have jarsigner.exe. I tried to included jarsigner.exe inside jre and tried to use it but it's not working.
With regards,
Avinash Nigam
To make jarsigner work with JRE instead of JDK. Need to bundle these files in JRE from JDK
From \bin\jarsigner.exe to \bin\jarsigner.exe
From \bin\msvcr100.dll to \bin\msvcr100.dll
From \bin\jli.dll to \bin\jli.dll
From \lib\tool.jar to \lib\tool.jar
I tested with this and found it working for me.