Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Is it advisable to have more than 1 JRE on a server ?

Posted on 2012-03-16
9
Medium Priority
?
326 Views
Last Modified: 2012-03-22
Is it advisable to have more than 1 JRE on a server ?


We have Linux box which has a bunch of existing applications . We have 1.4 JRE Installed
on it and some of the scripts use it . We have a new application that needs to be
built .But this new application needs 1.6 JRE .


My question is

1.Is it advisable to have more than 1 JRE installed and have my application point to that
explicitly

2.If we are to upgrade to 1.6 whats the risk of breaking the existing applications


3.I am confused on whether to follow option 1 or 2 .which is the standard one ?
0
Comment
Question by:Shaunsmith
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
9 Comments
 
LVL 2

Accepted Solution

by:
n4th4nr1ch earned 400 total points
ID: 37731057
It is advisable as long as you understand how to manage it.
alternatives is a command which you can use to manage multiple JREs on the same machine.
Linux doesn't have a problem with this, it's more of a human problem: how much confusion can you handle?
0
 
LVL 47

Assisted Solution

by:for_yan
for_yan earned 1600 total points
ID: 37731060
If you are talking about standlaone applications - you can have as many JDK's or JRE's on the server as you want - and make sure that you PATH when you start each application has your prefereble JRE_HOME/bin closer to the top of the path.

If you are running some servlet container - say Tomcat - then of coues all your J2EE applications will run in the JVM with which you strat your container
0
 
LVL 47

Expert Comment

by:for_yan
ID: 37731063
There is no standard decision there - it all depends on your particular situation and type of applications and so on.
to have several JRE's is not uncommon
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 47

Expert Comment

by:for_yan
ID: 37731067
Java is rather cinsistently downward compatible - so you should not expect many problems when mnoving to Java 6 from older versions of Java. still if you have big applications with lots of classes then you should test caredfully before moving - there may be some small details which would feel differently, so you want to be careful.
With samll applications probability of problems is natural;lly much less
0
 
LVL 47

Expert Comment

by:for_yan
ID: 37731070
Also if your applications are server type dioing mostly back-end work then probability of problems moving to newer Java will be less; the GUI part more probably will have some differenceas
0
 
LVL 47

Expert Comment

by:for_yan
ID: 37731077
If you happpen to recompile some parts of code on the newer java - you may see some deprecated warnings - although it is not bad to understand why these warnings appear in particular cases, you still should not worry too much about them, as in great majority of cases deprecated methods and functionality in the later version of java is still working as before, so do not panic about it, and rather not change the code because of these warnings - kit will mostly cause you more problesm if you change
0
 
LVL 47

Expert Comment

by:for_yan
ID: 37731089
If you have different versions of java and several JAVA_HOME/bin paths will be present on your path and if you are going to compile some pieces of code, I would warn you rather not to mix both JRE's and JDK's in this way - make sure have all of them JDK if you really need to recompile some part. Otherwise you may sometimes encounter cases difficult to diagnose when you happen to run compilation with Java version later than the one with which you run the applications (java -version may happen to be older than javac -version - this will cause problems)
0
 

Author Comment

by:Shaunsmith
ID: 37739676
Thank You for your answers . I think I will go with the option of installing a new version of Java in a seperate path so as not to disturb the existing applications

I have one more question . Do I install a JDK or a JRE ? My application is a simple standard java application that will be run on the command line and was wondering if there is any advantage or disadvantage to do either one of them
0
 
LVL 47

Expert Comment

by:for_yan
ID: 37739716
If you are going to do compilation or use some development tool on the machine then always install JDK's on that machine. If you are sure you'll never need to compile then install  JRE's on that machine.

for Tomcat prior to 5.5 the JDK was required to compile JSP's
The later versions of Tomcat carry compiler with their own installation so they
can work with JRE.

So whne you run java command it does not matter whether it comes form JRE or JDK.
0

Featured Post

Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question