I am using Tomcat 9 and Java 11 on my windows server.
In my system there are total 3 JDKs present (two Java 1.8.x and one JDK 11 )
JAVA_HOME environment varibable points to JDK11
Also registry keys current version points to JDK11
I cannot uninstall older version of java 1.8 from my system as some of the apps are still using java 8.
Now when I am running Tomcat 9 service , it is picking older version of Java 1.8.x & not Java 11.
In catalina.bat file I have also added following explicitly
set JAVA_HOME=D:\Java\jdk 11.0.8
But still it picks older version of java. In the tomcat configuration java tab also points to Java 11 dll file.
When I run the tomcat locally using startup.bat file & not start the service through services app then in catalina logs I get correct version of Java.
Please suggest why tomcat service is not picking latest java 11 version.
Try uninstalling your Tomcat service and installing it again using service.bat in tomcat folder.
service.bat remove
service.bat install
If that doesn't work ,check the appropriate registry key. Here is mine:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Apache Software Foundation\Procrun 2.0\Tomcat7.55\Parameters\Java
change the Jvm key value .
Note :To open regedit ,
In the search box on the taskbar, type regedit, then select Registry Editor (Desktop app) from the results.
Right-click Start , then select Run. Type regedit in the Open: box, and then select OK.
Related
I have been testing updating Oracle Java 8 to Red Hat OpenJDK Java 11 on a Windows Jenkins server, but I seem to have hit a wall. My Jenkins instance is stating that Java 11 is unsupported, returning the following error after I updated the JENKINS_HOME JRE files:
"We detected that your JVM is not supported by Jenkins. This is due to the limitation is one of the libraries that Jenkins uses, namely XStream. See this FAQ for more details."
Steps I've taken:
1. Stopped and disabled Jenkins service
2. Uninstalled Oracle Java 8 191 from control panel and removed remaining program files at Java\jdk1.8.0_191
3. Installed Red Hat OpenJDK 11.0.4 msi to Java\jdk11.0.4
4. Updated JAVA_HOME and PATH variables to point to new Java locations
5. Created JRE 11 from the JDK 11 files using all modules in JDK. Specifically I utilized this site for assistance creating the JRE. Placed JRE files on the server in the standard location, Java\jre11.0.4
5. Set Jenkins service to automatic and started it. Confirmed Jenkins site was working properly, then stopped and disabled service again
6. After backing up JENKINS_HOME, replaced the JRE folder there with the jre11.0.4 folder I created from the JDK 11 files.
7. Started Jenkins service. After navigating to the Jenkins site, I received the error message about the JVM being unsupported.
8. Stopped/disabled the Jenkins service, then updated the Jenkins.war to Jenkins 2.194 weekly release. (I was previously running Jenkins LTS 2.176.3.) Started Jenkins service, only to receive the same error.
I'm not sure how to proceed, the "Upgrading Jenkins Java version from 8 to 11" Jenkins documentation isn't much help at this point. The last step in the Upgrading Jenkins section says to "Use a package manager to install the new JVM" and to "Make sure the default JVM is the newly installed version. If it is not, use the correct java command in the Jenkins startup scripts". These instructions appear to be specific to Jenkins instances running on Linux OS. If they are for all OS types, I am unsure how to follow them in a Windows environment.
I've also reviewed Jenkins' documentation for Running Jenkins on Java 11, but didn't find any useful information there either.
And finally the FAQ hyperlink in the error message does not work, and the only information provided by this similarly named XStream site is a note stating XStream requires Java 8, which is in direct conflict with Jenkins' Java documentation that says Jenkins supports Java 8 and 11.
Any suggestions for getting any version of Jenkins to run with OpenJDK 11 or what my next steps should be here would be greatly appreciated.
Software and versions:
- Windows Server 2016
- Jenkins LTS 2.176.3
- Jenkins weekly release 2.194
- Oracle Java JDK and JRE 1.8.0.191
- Red Hat OpenJDK 1.11.0.4 and JRE created from all modules in the JDK files
So it seems I missed the following instructions in the Jenkins.xml file:
If you'd like to run Jenkins with a specific version of Java, specify
a full path to java.exe.
Another member of my team saw this and added a JAVA11_HOME environment to the Jenkins.xml file:
<env name="JAVA11_HOME" value="D:\Java\jdk11.0.4"/>
And then updated the executable path in the Jenkins.xml:
From the default:
<executable>%BASE%\jre\bin\java</executable>
To:
<executable>%JAVA11_HOME%\bin\java</executable>
Jenkins is finally up and running on Java 11!
I have jasperserver running on apache tomcat on a web application. I have Java version 1.4 installed and the correct JAVA_HOME environment variable set. I can get to "myurl:8080" just fine and it shows the apache tomcat page. Originally i installed java 1.8 which seemed to be incompatible for my old version of jasperserver.
I needed to install an older version of Java, so i uninstalled 1.8 and installed 1.4 on my linux instance for my Java App. However, when i try and connect to jasperserver through the app, it seems like it is still looking in the old directory for old java library. How can i configure this to look at my new directory in same location? The error is below.
java.io.FileNotFoundException: /usr/lib/jvm/java-8-oracle/jre/lib/rt.jar
The correct version of java is located below.
/usr/lib/jvm/java1.4.2_18/
Try changing the java_home and jre_home environment variables path,if you update
java version.The environment variables need to be edited.
Here is how to change or edit the environment variables
I have two jdks and jres installed in my pc java 1.5 and java 1.8 for some work purpose. Now I have one instance of tomcat 5.5 which I took from another pc and pasted it in my pc c:/servers folder. It is running fine using java 1.5. So I set the JAVA_HOME and path to java 1.5. Now I downloaded tomcat 7 binary distribution zip file and extracted it in my c:/servers directory. I changed the connector port, shutdown port and AJP port to different values. set CATALINA_BASE to c:/servers directory. But when I'm running the startup.bat two windows are popping up for a sec and they are closing. The server is not starting. I found the error as java.lang.UnsupportedClassVersionError. Bad version number in class file
Then I tried to install tomcat 8 using windows installer with again different port numbers in the same c:/servers directory which worked perfectly. It started and tomcat home screen also loaded. My work is survived with tomcat installer but I want to know why manual configuration failed.
OS = windows 10 64 bit
Please help me in making manual configuration of tomcat. If any other information is needed, I'll provide.
EDIT 1
I got this error java.lang.InvocationTargetException when I tried to install another instance of tomcat 5.5 manually in c:/servers directory
The exception UnsupportedClassVersionError occurs when you try to execute *.class files with an older version of Java as they were compiled for.
In your case, you are trying to run Tomcat 7 with Java 1.5, but its minimum requirement for the JRE is version 1.6. The latest version of Tomcat that supports Java 1.5 is Tomcat 6. Check out this overview for more information:
Apache Tomcat Versions
I install jdk1.8.0 and i set the environment variable JAVA-HOME and PATH
I download the jboss-eap-6.1.0.GA(AS 7.2.Final)
I set environment variable JBOSS-HOME.
i located jboss-eap-6.1 in 'D' drive so i set JBOSS-HOME=D:\jboss-eap-6.1.
After all these run standalone.bat file. but i'm not able to install jboss server.
it gives a black screen and giving like
JBoss EAP 6.1.0.GA(AS 7.2.0.Final-read hat-8) starting. ..
After 1 hr also it giving like this only.
Not able to start the Jboss server
please give me a Solution for this.
Thank you
According to RedHat's "Supported Configurations" document, Java 8 isn't supported.
There are some plans to add support of Java 8 to a 6.3.x or 6.4 version. (see https://developer.jboss.org/message/906154)
I am using Ubuntu operating system with Java version 1.7.0_15 (Iced Tea). I am unable to access the Java web start application. Every time I start it I get message that Java web start requesting JRE 1.7 and then says that it is unable to install so manually install and then it failed to install the JRE. I do not know what to do.
Here is my java version
Here is few important information
1. I have validated JNLP file using JaNeLa and there is no error.
2. Ubuntu is opening Application with JRE 1.6 perfectly fine.
3. On Windows every version is running perfectly fine.
4. I have tried with deployment tool kit but the always redirect me to the Sun page to download the linux version of JRE and even after installing that it again redirect me to the download page.
Please let me know if I can provide more information.
So finally after working whole day I have found the problem with my system. I am not sure why my question got -3 but it was valid question. The problem was with the Java plugin in the Firefox browser. Although I have installed jdk 7 on my machine but the firefox plugin was still pointing to the jre6 so giving error. So I have to manually create the link for the jre 7 in my machine
ln -s /usr/lib/jvm/<<location of jre 7>>/jre/lib/i386/libnpjp2.so ~/.mozzilla/plugins
Then I restarted the browser and make sure that I have the latest plugin and it started working, So it was not the java installed but it was firefox plugin.
Just FYI, oracle has stopped it support for java plugin for linux due to some licensing so you have to install it manually. Thanks
You can check the installed plug-in by typing 'about:plugins' in your address bar of firefox
IMHO OpenJDK 7 is not a JRE 7.
You may uninstall it before install oracle jre. Otherwise you have to use sudo update-alternatives to define the default java version
See https://askubuntu.com/questions/67909/how-do-i-install-oracle-jdk-6