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

I am upgrading the JDK version of the application server to 1.6. However, I dont understand why we need to place JDK on the application server instead of a JRE?

Since there is no need for any re-compilation of codes on the application servers.

Would the upgrade of JDK affect any keystore? Since I am pointing the JAVA_HOME to another new path.

Appreciate and thanks for the info.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

The requirement of JDK or JRE is dependent on the particular application server itself. (e.g JBOSS, tomcat, glassfish, etc), and its strategies for compiling to bytecode, and how it decides on its dependencies at start-up.

In a strict sense if your java application just executes Java byte code in the form of classes, then you should be able to get away with just a JRE. However whether this is true or not depends on the Java App server strategy to either check for an installed JDK defensively at start-up, or just throw an exception at some point when compilation is requested.

Some application servers use the javac to compile jsp to class files and hence are dependent on having a system JDK installed, this can be contrasted with say tomcat, which bundles its own compiler for jsps, hence can run under the JRE.

The java keystore is a feature of the Java SE, and both openJDK and Hotspot reference a file $JAVA_HOME/lib/security/java.security to select their defaults.

Unless you have changed $JAVA_HOME/lib/security/java.security, the default keystore.type=jks file implementation looks for $HOME/.keystore hence its up to you to over ride the location, and both the 1.5 and 1.6 version of the sunJDK use that format and default location.

so basically changing $JAVA_HOME wont effect the location of the keystore

(unless you have actually over ridden the keystore location into the $JAVA_HOME folder...)

but it might matter if you are using some non-default provider, or have set some non-default options in java.security.

share|improve this answer
    
Does it affect keystores? –  optimus Mar 24 '12 at 15:32
    
sorry, edited the answer to add that too late. –  Tom H Mar 24 '12 at 15:45
    
Basically the keystore is not in the JAVA_HOME, it starts by looking in the default location in the user path, unless you override it. e.g. keytool -list -v keytool error: java.lang.Exception: Keystore file does not exist: /home/tomh/.keystore –  Tom H Mar 24 '12 at 15:47
    
oddly, the javase docs describes the default jks keystore as having a proprietary format, but I see that openJDK uses that default also, so I would be interested to see whether they were indeed compatible across sun/openjdk and java 5 and 6 –  Tom H Mar 24 '12 at 17:01
    
Hi, Basically I have 2 directories for my JDK. The application server is pointing to JAVA_HOME which depends on /weblogic/jdk (a link). In this case, most probably this will affect the SSL certs installed on my webserver. How should I move this keystore over to the new jdk? /weblogic/jdk -> symbolic link /weblogic/jdk1.50_11 old jdk /weblogic/jdk1.60 -> new jdk –  optimus Mar 24 '12 at 17:29

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.