Solved

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

Posted on 2012-03-16
9
286 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
  • 7
9 Comments
 
LVL 2

Accepted Solution

by:
n4th4nr1ch earned 100 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 400 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
 
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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This video teaches viewers about errors in exception handling.

863 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now