Glassfish installation JRE not found - windows

I can't install Oracle Glassfish Server 3.1.2.2
When I run the installer (as admin) a dialog box appears saying "extracting files" and then I get the following error box saying I don't have JRE installed.
I have JRE and JDK 1.6 and 1.7 installed (all are 64 bit).
All are in the PATH system variable.
I've tried the program from CMD using the instructions in the error.
The command I use to run is:
OracleGlassfishServer(OGS)-3.1.2.2-windows.exe" -j "c:\Program Files\Java\jdk1.7.0_09\bin
I've also tried with the 1.6 bin.
I am running Win 7 64 bit.
The only thing I haven't thought to try yet was installing a 32bit JRE in the Program Files(x86) directory. Does it make sense that this would require a 32bit JRE?
What else could be the cause?

The Glassfish installation program requires the path to the JRE installation folder to be in the JAVA_HOME environment variable; if the variable is not set the folder can be specified on the command line. In both cases the folder must be the root folder of the JRE, not the bin subfolder.

Unfortunately, I found setting JAVA_HOME to be ineffective for me.
The solution that worked on my server was to run the Glassfish install with the -j option pointing to my JDK.

using command line and pointing to JRE installation directory should work Just fine, the problem with the above command is that you were pointing to bin directory, simply point to the home directory that is "c:\Program Files\Java\jdk1.7.0_09"

Related

Not a valid Java Home Error while installing Oracle Web Logic Server

I need help to extract WLS, I tried to install WebLogic Server with CMD and i already setup java_home.
But i've got the following error:
Extracting the installer . . . . . . Done
This installer must be executed using a Java Development Kit (JDK)
but C:\Program Files\Java\jre7 is not a valid JDK Java Home.
The log is located here: C:\Users\E440\AppData\Local\Temp\OraInstall2016-12-18_05-38-26AM\launcher2016-12-18_05-38-26AM.log.
Press Enter to exit
I trying to set JAVA_HOME
C:\Oracle\FMW>set java_home
JAVA_HOME=C:\Program Files\Java\jdk1.7.0_79
And that is the path that i set in environmet variable, but it still display the same error.
I change the command to specified the oracle home
C:\Oracle\FMW>java -jar fmw_12.2.1.2.0_wls_quick.jar oracle_home=C:\app\user\product\11.2.0\dbhome
But again the error is still the same.
The C:\Program Files\Java\jre7 path is not even in my environment variable.
Is there something I missed?
I had the same issue and found this way around:
1- Copied the installer to the JDK folder you want to use for the installation.
In my case: C:\Program Files\Java\jdk1.8.0_121\bin
(Just to make it easier to get to it from the command line latter)
2- Open cmd and navigate until the Java JDK folder
3- Then execute the installer using the java in that folder:
./java -jar fmw_12.2.1.3.0_wls.jar
Here is an image of what I did.
(Dont forget to remove the fmw_12.2.1.3.0_wls.jar from there after the installation is completed)
As I say, is just a way around if you just want to go over the issue and get Weblogic installed. Im sure there are more elegant solutions, but I hope this one helps ;-)
Set up the the path too (in addition to java_home), so the JDK comes before the JRE:
set path=C:\Program Files\Java\<JAVA_VERSION>\bin;%path%
Remember to change the <JAVA_VERSION> to your JAVA version.
eg:
set path=C:\Program Files\Java\jdk1.8.0_202\bin;%path%
I ran a command where java in command prompt and it showed me that the java was installed here:
C:\Program Files (x86)\Common Files\Oracle\Java\javapath\java.exe
I deleted this from the environment variables under path in windows.

Oracle SOA 12c Installation in windows 7 64 bit- Issues

while i am running
java -jar fmw_12.1.3.0.0_soa_quickstart.jar
I am executing this command from where my JDK is installed.
Error Message : This installer must be executed using java development kit (JDK)
but C;/program filed /jre is not a valid JDK.
Kindly help.
Oracle Fusion Middleware 12c (12.1.3) requires a minimum of JDK 7.0 Update 55 or later. If you have an older version please update the JDK.
Let’s say your JDK is installed in:
C:\Program Files\Java\jdk1.7.0_xx
Search for cmd.exe in the Start menu. Right-click the cmd.exe and select Run as Administrator. In the prompt run the following command to set the JAVA_HOME:
SET JAVA_HOME="C:\Program Files\Java\jdk1.7.0_xx"
Using the command prompt, navigate to the directory where you unzipped the jar files.
Launch the installation wizard with the appropriate command.
%JAVA_HOME%/bin/java.exe -jar fmw_12.1.3.0.0_soa_quickstart.jar
For details about the installation refer to the official oracle documentation here
Install jdk8. Set JAVA_HOME to the installed jdk8. Navigate to %JAVA_HOME\bin.
Run java -jar complete_path_of_dir\fmw_12.1.3.0.0_soa_quickstart.jar.
Did you check that you're unpacking a jar file which contains another jar file? Firstly, unzip the jar file and then execute the contained jar file.
open your command prompt in admininstrative mode and change your directory to the bin directory of jdk(must be this path- C:\Program Files\Java\jdk\bin).
Now from this directory, install the soa installer(.jar file) by giving its complete path. In my case, I had my soa installer in *E:* drive, so my command was like this:-
C:\Program Files\Java\jdk1.8.0_131\bin>java -jar E:\fmw_12.2.1.0.0_soa_quickstart.jar
in a simple way go to jdk bin folder and execute the following, shoot this command from my jdk\bin location:-
C:/Program Files\Java\jdk1.8.0_131\bin>java -jar d:\fmw_12.2.1.0.0_soa_quickstart.jar
note: make sure you logged in as a admin user
Even I faced the same issue when installing oracle fusion middleware, but i resolved it by following steps:
Open command prompt by right clicking 'Run as administrator'.
Install the latest JDK version.
Change the directory where your weblogic's .jar file is present like
cd C:\Users\Ashwini_SP\Documents\Softwares\Jdeveloper_OSB\fmw_12.2.1.2.0_soaqs_Disk1_1of2
now select the jdk path and install it
"C:\Program Files\Java\jdk1.8.0_144\bin\java.exe" -jar fmw_12.2.1.2.0_soa_quickstart.jar

iReport not starting using JRE 8

I have downloaded and installed the iReport 4.5 using te Windows installer. But when I try to start the iReport it shows the splash screen but does not start.
My JRE version is 8.
There's another way if you don't want to have older Java versions installed you can do the following:
1) Download the iReport-5.6.0.zip from https://sourceforge.net/projects/ireport/files/iReport/iReport-5.6.0/
2) Download jre-7u67-windows-x64.tar.gz (the one packed in a tar) from https://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html
3) Extract the iReport and in the extracted folder that contains the bin and etc folders throw in the jre. For example if you unpack twice the jre-7u67-windows-x64.tar.gz you end up with a folder named jre1.7.0_67. Put that folder in the iReport-5.6.0 directory:
and then go into the etc folder and edit the file ireport.conf and add the following line into it:
For Windows
jdkhome=".\jre1.7.0_67"
For Linux
jdkhome="./jre1.7.0_67"
Note : jre version may change! according to your download of 1.7
now if you run the ireport_w.exe from the bin folder in the iReport directory it should load just fine.
don't uninstall anything. a system with multiple versions of java works just fine. and you don't need to update your environment varables (e.g. java_home, path, etc..).
yes, ireports 3.6.1 needs java 7 (doesn't work with java 8).
all you have to do is edit C:\Program Files\Jaspersoft\iReport-nb-3.6.1\etc\ireport.conf:
# default location of JDK/JRE, can be overridden by using --jdkhome <dir> switch
jdkhome="C:/Program Files/Java/jdk1.7.0_45"
on linux (no spaces and standard file paths) its that much easier. keep your java 8 for other interesting projects...
iReport does not work with java 8.
if not yet installed, download and install java 7
find the install dir of your iReport and open the file: ireport.conf
(you will find it here: iReport-x.x.x\etc\ )
change this line:
#jdkhome="/path/to/jdk"
to this (if not this is your java 7 install dir then replace the parameter value between ""s with your installed java 7's path):
jdkhome="C:\Program Files\Java\jdk1.7.0_67"
While ireport does not officially support java8, there is a fairly simple way to make ireport (tested with ireport 5.1) work with Java 8. The problem is actually in netbeans. There is a very simple patch, assuming you don't care about the improved security in Java 8:
http://hg.netbeans.org/jet-main/diff/3238e03c676f/openide.util/src/org/openide/util/WeakListenerImpl.java
I didn't even use the exact netbeans source used by ireport. I just downloaded the latest WeakListenerImpl.java in full from the above repository, and compiled it in the ireport directory with platform9/lib/org-openide-util.jar in the compiler classpath
cd blah/blah/iReport-5.1.0
wget http://hg.netbeans.org/jet-main/raw-file/3238e03c676f/openide.util/src/org/openide/util/WeakListenerImpl.java
javac -d . -cp platform9/lib/org-openide-util.jar WeakListenerImpl.java
zip -r platform9/lib/org-openide-util.jar org
I am avoiding running eclipse just to edit jasper reports as long as I can. The netbeans based ireport is so much lighter weight. Running Eclipse is like using emacs.
I fixed this on my PC,
on my environment
iReport was iReport-5.1.0 ,
both jdk 7 and jdk 8 had been installed.
but iReport did not load
fix:-
1. Find the iReport.conf
//C:\Program Files (x86)\Jaspersoft\iReport-5.1.0\etc
Open it on text editor
copy your jdk installation path
//C:\Program Files (x86)\Java\jdk1.8.0_60
add jdkhome= into the ireport.conf file
jdkhome="C:/Program Files (x86)/Java/jdk1.8.0_60"
Now iReport will work
It works only with JRE 1.7
just download it and extract to your prefered location
and use the following command to open the iReport
ireport --jdkhome Path To JDK Home
With ireport 4.7.1, after setting jdkhome in etc/ireport.conf, ireport.exe doesn't start. No splash, no window.
When I launch ireport_w.exe in a cmd, I get this message:
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Solution:
In file etc/ireport.conf, on the line starting with default_options, I have reduced the value of -J-XX:MaxPermSize to 256m instead of 512m
default_options="--branding ireport -J-Xms256m -J-Xmx512m
-J-Dorg.netbeans.ProxyClassLoader.level=1000 -J-XX:MaxPermSize=256m"
I have installed IReport 5.6 with Java 7: not working
I tried to install Java 6 and added the path to "ireport.conf" file like the attached screenshot and it worked fine :D
So the steps is :
Install IReport 5.6
Install JDK 6
Edit "ireport.conf" file like the below image and Enjoy ;)
I was tired of searching on google how to run iReport with java 8.
I did everything as said on the Internet,But I don't know why they weren't work for me.
Then I Change My Computer JDK Current Version form 1.8 to 1.7 Using Registry Editor.
Now it work fine.
To Change Current Version
Start => Type regedit (Press Enter) => HKEY_LOCAL_MACHINE => SOFTWARE =>
JavaSoft => Java Development Kit => Change Key Value of CurrentVersion From 1.8 to 1.7
For me, the combination of Stuart Gathman's and Raviath's answer in this thread did the trick in Windows Server 2016 for iReport 5.6.0.
In addition, I added a symlink within C:\program files\java\jre7 to jdk8 like this:
cmd /c mklink /d "C:\program files\java\jre7\bin" "C:\Program Files\Java\jdk1.8.0_181\bin"
because iReport was constantly complaining that it could not find java.exe within C:\program files\java\jre7\bin\ - So I served it the available java.exe (in my case V8.181) under the desired path and it swallowed it gladly.

Error occurred during initialization of VM (java/lang/NoClassDefFoundError: java/lang/Object)

I'm trying to install Java to use Eclipse (I followed all instructions to install Java and Eclipse) but my Eclipse is not starting due to some bad configuration I guess. I can't figure out why it's not working for me.
Eclipse Installation:
Extracted Eclipse at C:\eclipse
Created a shortcut to my desktop having target C:\eclipse\eclipse.exe
When I try to run Eclipse with this shortcut, I see following Eclipse splash screen for a second and it disappears. Eclipse does not start at all.
JAVA Installation:
Installed JDK at C:\Program Files\Java\jdk1.7.0_10
Installed JRE at C:\Program Files\Java\jre7
Environment Variables Configuration:
JAVA_HOME = C:\Program Files\Java\jdk1.7.0_10
PATH = C:\Program Files\Java\jdk1.7.0_10\bin;
I tested my Java installation using the console and figured out this issue but I don't know how to fix it, and I guess this is causing Eclipse not to start.
Problem:
Go to Eclipse folder, locate eclipse.ini file, add following entry (before -vmargs if present):
-vm
C:\Program Files\Java\jdk1.7.0_10\bin\javaw.exe
Save file and execute eclipse.exe.
please try to execute java from
C:\Program Files\Java\jdk1.7.0_10\bin
i.e from the location where java is installed.
If it is successful, it means that the error lies somewhere in the classpath.
Also, this guy seems to have had the same problem as yours, check it out
Check that downloaded eclipse/JDK/JRE is compatible with your processor/OS architecture that is are they 32bit or 64bit?
Not able to run Appium {“message”:”A new session could not be created. (Original error: ‘java -version’ failed
I used Jdk 1.8 and JRE 1.8, Classpath is also set properly but I observed that Java command gives Error to initialization of VM (java/lang/NoClassDefFoundError: java/lang/Object)
Solution:
Uninstalled JRE and JDK completely
Installed JRE 1.8 then
Installed JDK 1.8
Set Classpath
check Java command works or not and its working
also able to execute the Appium program thru Eclipse Kepler Service Release 2 with JDK1.8 support
I had the same error in my case was when I needed to update jdk 7 to jdk 8, and my bad was just I installed jdk8 and I never installed jre8, only that, the error was solved immediately when I installed jre8.
Try placing the desired java directory in PATH before not needed java directories in your PATH.
I had the same issue on Windows 7 and I had to install both JDK and JRE and it's a success.
I faced the same problem,Eclipse splash screen for a second and it disappears.Then i noticed due to auto update of java there are two java version installed in my system. when i uninstalled one eclipse started working.
Thanks you..
I've observed this with STS and Eclipse and running java from CMD too on Windows 7/8/10 and following was my simple solution:
Actually, when I installed JDK 8 and STS/Eclipse it created one directory i.e. C:\ProgramData\Oracle\Java\javapath with the following files:
C:\ProgramData\Oracle\Java\javapath\java.exe
C:\ProgramData\Oracle\Java\javapath\javaw.exe
C:\ProgramData\Oracle\Java\javapath\javaws.exe
Along with that, it appended Path Environment variable of System with this location C:\ProgramData\Oracle\Java\javapath
I've just removed above entry from Path Environment variable of System and added the location of the actual JDK instead i.e. C:\Program Files\Java\jdk1.8.0_131\bin
Now that is not necessary to add that -vm option in eclipse.ini or
SpringToolSuite4.ini either.
I just spent about 1 hour to figure out possible solution for the same error.
So what I did under MS WIndows 7 is following
Uninstall all Java packages of all versions.
Download last packages Java SE or JRE for your 32 or 64 Windows and install it.
First install JRE and second is Java SE.
Open text editor and paste this code.
public class Hello {
public static void main(String[] args) {
System.out.println("test");
}
}
Save it like Hello.java
Go to Console and compile it like
javac Hello.java
Execute the code like
java Hello
Should be no error.
sometime you missed some file like I missed my one file rt.java
so better to check yours .........
C:\Program Files\Java\jdk1.8.0_112\jre\lib
0
I just spent about 1 hour to figure out possible solution for the
same error.
So what I did under MS WIndows 7 is following
Uninstall all Java packages of all versions.
Download last packages Java SE or JRE for your 32 or 64 Windows and
install it.
First install JRE and second is Java SE.
List item
Below error is thrown when there are multiple versions of jdk on your machine:
error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object
so for this Just use below:
set PATH="JDK bin path" in cmd
I had a same issuse, my file location was in D-drive, and then i shifted to the c-Drive and it works.

How to prevent that java.exe is installed in Windows' system32?

Is there a way to prevent that the Java installation routine (e.g. jdk-7u1-windows-i586.exe) copies java.exe into C:\Windows\system32 directory?
I have to install my software on a client's laptop and I don't want to break other Java applications which are already installed on the machine. In other words I want to install a private JRE which is only used by my software.
By now, I copied an already installed JRE from my computer to the client's machine.
I discovered yesterday that there is a problem with Java versions on Windows, as you know keeping java up to date these days is critical, especially the JRE used by Internet explorer located in the Windows system32 or syswow64 folder.
You can perform a search for java in your C: drive and look at the various executable files it finds to determine if the situation applies on a specific system.
After doing some research I find that when the Java updater runs, it only updates the files installed in the JAVA home , usually located on the program files, but it does NOT update the files located in the windows system folder. As a result and since the system folder is in the default system PATH , the usage of Internet Explorer continues to use an old version of the JAVA files ( java.exe , javaw.exe , javaws.exe )
The solution is to uninstall java using the control panel uninstall programs feature, download most recent version and install again.
Cheers!
Fernando
I recently upgraded to java 8 and discovered this problem as the java version under system32 was still java 7. It stops you even running version as it complains about the registry keys
U:\>java -version
Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion'
has value '1.8', but '1.7' is required.
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.
Doing the following pointed me to the culprit:
U:\>where java
C:\Windows\System32\java.exe
C:\Program Files\Java\jdk1.8.0_45\bin\java.exe
I 'solved' this problem by just deleting the java under system32! I'm unsure of what consequences this will have.
You can just provide the JRE you want to use on your software and:
Set the JAVA_HOME variable before you run your application
Point to the correct java.exe file (e.g. ..\jre1.5.0_22\bin\java <your_java_main>)
This can be done in a *.bat file for example.
After running the *.bat file you created, all other java version will be ignored and it won't matter which versions are, or will be, installed on that pc.
I found the newest JDK still doesn't write correct code against registry.
The issue is if a computer doesn't have JRE, JDK doesn't register JRE in registry correctly.
For those install JDK 1.7u72 Just add Software\JavaSoft\Java Runtime Environment as the error message indicate. And add a string entry of CurrentVersion with value 1.7.
And then add Software\JavaSoft\Java Runtime Environment\1.7 and put a JavaHome string entry with value "C:\Program Files\Java\jre7". And JRE will function correctly.
Blame Oracle, if you use Registry, then write correct code, otherwise don't use the Registry!
All you have to do is go to Control Panel -> Programs Uninstall a program. Uninstall the old java updates and keep the newest java update and java development kit update. Your newest java update and java development kit update should have the same number.
Windows 10 Solution
Check Java Version in Console (CMD) with java -version
Check in Console (CMD) with where java, which Java Path's are enlisted.
If it you shows you "C:\Windows\System32" in its output, you will have a problem to get to your %JAVA_HOME%, where your wanted Java version resides.
Meaning, you need to get rid of "java.exe" in "C:\Windows\System32".
Just uninstall the JRE in the Software ("Programs and Features")
Hint: Keep in mind, do NOT the JDK, here in my case "Java SE Development Kit 8 Update (64-bit)"), but the JRE.
One way I would try would be to create a write-only empty file with the name java.exe into the System32 folder.

Resources