Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #29936
| NNTP-Posting-Date | Mon, 08 Sep 2014 05:25:47 -0500 |
|---|---|
| Date | Mon, 08 Sep 2014 11:25:44 +0100 |
| From | lipska the kat <lipskathekat@example.com> |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 |
| MIME-Version | 1.0 |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: install multiple Java versions |
| References | <efb21ee7-215a-4ded-94b0-4f6de34092cb@googlegroups.com> |
| In-Reply-To | <efb21ee7-215a-4ded-94b0-4f6de34092cb@googlegroups.com> |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Message-ID | <h4idnTpXePO2GZDJnZ2dnUVZ8qednZ2d@bt.com> (permalink) |
| Lines | 78 |
| X-Usenet-Provider | http://www.giganews.com |
| X-AuthenticatedUsername | NoAuthUser |
| X-Trace | sv3-3Zxy+uFGlL2pjmjeI6kMIsC35CTJw+stNpieGpDyfKmtpQGwdiT7sh5+v0cKxBmYTKkaBNCHlhKYR3w!T/Sg6ag5KNfIsktqq4LO/QjV3Uq0lLGloRH8lzLuK3rlg9tBEmI5WPuo06eTYlzQqi4G+6n6qQ== |
| X-Complaints-To | abuse@btinternet.com |
| X-DMCA-Complaints-To | abuse@btinternet.com |
| X-Abuse-and-DMCA-Info | Please be sure to forward a copy of ALL headers |
| X-Abuse-and-DMCA-Info | Otherwise we will be unable to process your complaint properly |
| X-Postfilter | 1.3.40 |
| X-Original-Bytes | 4211 |
| Path | csiph.com!usenet.pasdenom.info!news.stben.net!border3.nntp.ams.giganews.com!backlog3.nntp.ams.giganews.com!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail |
| Xref | csiph.com comp.lang.java.programmer:29936 |
Show key headers only | View raw
On 08/09/14 10:31, marc.at.compass@gmail.com wrote: > Hello, > > I need to setup a server that will contain multiple Java versions. One version is part of a Tomcat installation and will contain Java 1.7. Also I need to install a Java program that currently uses Java 1.4.2. OS will probably be Linux RHEL 6.x, however Windows 2012 might be an option as well (TBD). > I know how to install multiple Java versions in Windows. How does this work in Linux? Can I just install Tomcat (with it's included JVM) and the JDK 1.4.2 (I read RHEL needs JDK, not JVM) separately? > > Then I have the config file of the application point to the Java 1.4 bin directory location. That should do it. > > When googling this I found some instructions about the Linux Alternative command. Makes it esay to switch between multilpe Java versions on a Linux system. But I do need both Java versions (Tomcat & Java 1.4) to be usable simultaneously, not just one. > > I'm not a Linux man. Is using multiple Java versions under Linux as easy as just installing them or do I need to do more? > > Thanks! > Marc The easiest way to do this on Linux based machines is as follows. 1. DO NOT USE a package manager in /opt (or wherever) create a directory for each release /opt/java1.4 /opt/java1.5 /opt/java1.6 /opt/java1.7 goto http://www.oracle.com/technetwork/java/javase/downloads/index.html and choose your poison so for 1.7 on 64bit machine you might go with jdk-7u67-linux-x64.tar.gz This is called a gzipped tarball in Linux speak Put the tarball in the relevant dir in this case /opt/java1.7 then extract the archive something like (ottomh) tar -xvf jdk-7u67-linux-x64.tar.gz That's it, it's 'installed' all you need to do is set the path and classpath for your chosen distro so, for example I have several instances of Tomcat running here's an example on port 80 [lipska@blackhole ~]$ sudo cat /etc/init.d/tomcat7 [sudo] password for lipska: # chkconfig: - 71 19 # description: Start up the Tomcat servlet engine. JAVA_HOME=/home/lipska/java/jdk1.7.0_51 CATALINA_HOME=/opt/apache-tomcat-7.0.42 CATALINA_BASE=$CATALINA_HOME export JAVA_HOME CATALINA_HOME CATALINA_BASE CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$CATALINA_HOME/bin/commons-daemon.jar:$JAVA_HOME/lib/tools.jar:$CATALINA_HOME/bin/tomcat-juli.jar TOMCAT_USER=tomcat TMPDIR=/var/tmp I'm running Tomcat as a deamon in this instance and setting the version of Java for this instance of Tomcat, I 'installed' Java in my home directory as I have various different accounts for different Javas although this may not work for you. There are other ways of doing it, maybe JAVA1_7_HOME or some such You can also set the path to the interpreter if that is required. -- lipska the kat - treacherous feline. Proudly nominated for IPOTY 2014 - LIGAF GNU/Linux user #560883 - linuxcounter.net
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
install multiple Java versions marc.at.compass@gmail.com - 2014-09-08 02:31 -0700 Re: install multiple Java versions lipska the kat <lipskathekat@example.com> - 2014-09-08 11:25 +0100 Re: install multiple Java versions marc.at.compass@gmail.com - 2014-09-08 04:02 -0700 Re: install multiple Java versions Marcel Mueller <news.5.maazl@spamgourmet.org> - 2014-09-08 20:08 +0200
csiph-web