Solved

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

Posted on 2012-03-16
9
261 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
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…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

759 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

23 Experts available now in Live!

Get 1:1 Help Now