Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a webapp from Atlassian, called as Crowd, in order for this app to function, i need to have tomcat, and OracleJDK. the app provides a tomcat container, but that is not what i want. I want to install tomcat, so i can get the JSCV daemon installed, which will be used by me to use the Virtual Host.

Now, the question is, is it possible to have both openJDK and oracleJava installed on the same machine? Is it possible to make tomcat use Oracle JAVA instead of openJDK.

if tomcat uses OracleJava, can i still use, JSCV to function on the machine so i can use my virtual servers.

PS -Crowd Installation is not an issue, just posted it so you know what is my aim -Crowd only works with oracle Java, 1.6 and 1.7 only -Server OS is CentOS, and the primary OS, which will run apache is a Ubuntu Instance(might be irrelevant)

share|improve this question

1 Answer 1

up vote 0 down vote accepted
Now, the question is, is it possible to have both openJDK and oracleJava 
installed on the same machine? Is it possible to make tomcat use Oracle JAVA
instead of openJDK.

Yes.

Set (export) JAVA_HOME variable to wherever the jre you want to use is installed before starting tomcat.

To change default java, you can follow this documentation.

share|improve this answer
    
i have tried it, but the problem is, i do not know where is the installation of JRE of oracle stored...is it the ..... /usr/bin/jre or /usr/java/jdk1.7/bin/jre –  Vijit Jain Jun 17 '13 at 20:42
    
It's the /usr/java/jdk1.7/bin/jre, so your JAVA_HOME should point to /usr/java/jdk1.7. if you've installed through rpm you can do either a rpm -qf /usr/java/jdk1.7/bin/java or a rpm -ql jdk (jdk names as the package you installed) –  Petter H Jun 18 '13 at 5:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.