API
@-Formulas
JavaScript
LotusScript
Reg Exp
Web Design
Notes Client
XPages
 
Determine Java JVM Version for Notes
For those of you that write Java in Notes, you have probably realized that it doesn't matter what version of the Java Virtual Machine (JVM) you have installed on your system (workstation or server) because Notes uses a set JVM version. But which one? This little piece of Java code can tell you what JVM is being used.

What you need to do is create a Java agent. Make it a scheduled agent. Set it up to run daily at 1:00 AM (so it will run pretty soon after being saved). When you create a Java agent, Domino Designer puts in a "skeleton" of code for you. You will only need to add one line of code, and it goes in the place where Domino inserted // (Your code goes here) . The line of code is:

System.out.println(System.getProperty("java.version"));

Then save and close the agent. When the agent runs, it will print the current JVM version of your server into the Notes log, where you can see the results. (Of, if you use the "live" version of the Server Console, you can see it as the agent runs). For example, our production server is version 6.0.2 CF1, and the JVM version is 1.3.1

There are lots of properties you can inspect. Here are several that we use in a debugging scenario. They should be self-explanatory.

System.out.println("java version = " + System.getProperty("java.version"));
System.out.println("java runtime version = " + System.getProperty("java.runtime.version"));
System.out.println("java home = " + System.getProperty("java.home"));
System.out.println("java vm version = " + System.getProperty("java.vm.version"));
System.out.println("java vm name = " + System.getProperty("java.vm.name"));
System.out.println("java compiler = " + System.getProperty("java.compiler"));
System.out.println("java extension directory path = " + System.getProperty("java.ext.dirs"));
System.out.println("java library path = " + System.getProperty("java.library.path"));
System.out.println("os version = " + System.getProperty("os.version"));
System.out.println("os name = " + System.getProperty("os.name"));
System.out.println("os architecture = " + System.getProperty("os.arch"));
System.out.println("path separator = " + System.getProperty("path.separator"));
System.out.println("file separator = " + System.getProperty("file.separator"));
System.out.println("user directory = " + System.getProperty("user.dir"));
System.out.println("user name = " + System.getProperty("user.name"));