0

I have an application in production which runs on java 6. I need to deploy another application which uses Tomcat8 and for Tomcat8 installation i need latest version of Java 1.8 installed in the same box.

I don't want to change any of the existing parameters, environmental variables so that the old application already running should not stop working. So i don't want to use msi installer (exe) for Jdk installation.

How do I install new version of Java without disrupting the previous version. Also how do i install Java in production without using the exe.

Megan
  • 876
  • 2
  • 10
  • 20
  • In production on which operating system/distribution? And are you sure, this question doesn't rather belong over to [serverfault](https://serverfault.com/)? – dhke Jul 27 '16 at 07:23
  • Simply install it in another directory than the already installed Java 6. – Jesper Jul 27 '16 at 07:34

2 Answers2

0

Simply download the server JRE. It's a tar.gz file not an exe. http://www.oracle.com/technetwork/java/javase/downloads/server-jre8-downloads-2133154.html

Simon Martinelli
  • 34,053
  • 5
  • 48
  • 82
  • it is for JRE. I am looking for JDK. – Megan Jul 27 '16 at 07:30
  • 1
    Why do you want a JDK? Tomcat doesn't require that: Apache Tomcat 8.5 requires a Java Standard Edition Runtime Environment (JRE) version 7 or later. – Simon Martinelli Jul 27 '16 at 07:41
  • server.bat uses java_home and jre_home both. – Megan Jul 27 '16 at 10:58
  • C:\installation\apache-tomcat-8.5.4\bin>service.bat install The JAVA_HOME environment variable is not defined correctly This environment variable is needed to run this program NB: JAVA_HOME should point to a JDK not a JRE – Megan Jul 28 '16 at 02:03
  • It's completly valid to point JAVA_HOME to a JRE i.e. on a server: http://stackoverflow.com/questions/17601827/which-one-should-java-home-to-point-jdk-or-jre – Simon Martinelli Jul 28 '16 at 08:18
  • and Tomcat doesn't need anything from JDK it uses Eclipse compiler to complie JSPs – Simon Martinelli Jul 28 '16 at 08:20
  • So do you mean i don't need jdk for a standalone tomcat installation.if so, what should i do in server.bat where it is looking for JAVA_HOME and JRE_HOME. If i make both same as JRE_HOME, then too throws the error at the line:if not exist "%JAVA_HOME%\bin\javac.exe" goto noJavaHome. I need to install and start tomcat as a service. I am not installing it for eclipse. – Megan Jul 28 '16 at 23:31
  • server.bat, there is clear print statement as:echo The JAVA_HOME environment variable is not defined correctly echo This environment variable is needed to run this program echo NB: JAVA_HOME should point to a JDK not a JRE – Megan Jul 28 '16 at 23:34
0

if its a linux machine, Use the below

apt-cache search jdk

Select the required jdk and give the command

apt-get install jdk_name_selected

Do this as root user, or a sudo user

Syed
  • 61
  • 2
  • 10