Hi,
I am new to Notes Developement and have a question that I have not been able to find anyhwere as of yet.
If I write a stand alone Java app will the Notes JVM run it?
Chad
Hi,
I am new to Notes Developement and have a question that I have not been able to find anyhwere as of yet.
If I write a stand alone Java app will the Notes JVM run it?
Chad
Subject: Running a stand alone Java app
Not unless you explicitly use the Notes JVM to run the application. Remember when running a Java application, the java command refers to the JVM used, either on the PATH, or by explicit name. Suppose I have Notes installed on my local system in c:\apps\notes, and the Sun JDK installed in d:\jdk1.4.2, and further assume that d:\jdk1.4.2\bin is in the PATH. If I use the following command:
java myApplication
The OS will use normal path rules to find the “java” command, and in most cases will find java.exe in the JDK. Now if you wanted to explicitly use the JVM in Notes, you would simple be explicit about which JVM to run, like this:
c:\apps\notes\jvm\bin\java.exe myApplication
Which will use the JVM in Notes. Please note that running the Notes JVM like this does not automatically give you access to classes in Notes.jar, etc, you must have added them to your CLASSPATH or mention them on the command line like:
c:\apps\notes\jvm\bin\java.exe -cp c:\apps\notes\Notes.jar myApplication
Also make sure your c:\apps\notes directory is in the PATH somewhere or the native methods will not find the DLL’s that implement the native methods. And you can just add c:\apps\notes\jvm\bin to your PATH, so all java commands find it instead of any other JVM you have installed. Depends on your needs.
Hope this helps.
–Joe
Joseph Millar
Principal Software Engineer
Brightline Technology
Subject: RE: Running a stand alone Java app
Thank You, that is very helpful.
I have another question you could probably answer also.
The problem I have is that all the pc’s here have Notes installed and the app I need to write will be in Java but they all do not have the Sun JVM installed. So I need to be able to use the Notes JVM to run the app instead of the JVM or the JRE from Sun because it would be too time consuming to install one or the other on 3000 or so pc’s.
If I wrote a class that looked to see what JVM was installed and used it then I should be able to run the app on any of the pc’s we have, is that correct?
Chad
Subject: RE: Running a stand alone Java app
Chad SC said:If I wrote a class that looked to see what JVM was installed and used it then I should be able to run the app on any of the pc’s we have, is that correct?
Not sure what you mean here. If you wrote a Java class and it’s running, that presupposes you already have and found a JVM to use. Perhaps I am misunderstanding you? The JVM in any recent Notes client will run an application, some of the older versions of Notes did not ship the java.exe executable with the JVM on the client, so you will have to be careful there.
–Joe
Joseph Millar
Principal Software Engineer
Brightline Technology
Subject: RE: Running a stand alone Java app
Sorry for being confusing.
I’ll try to be more clear if I can. The application will run fine on my pc because I have the Sun JVM and Notes 6 on my pc, but I was told that the Notes JVM would not run a stand alone Java application, which didn’t make any sense to me.
What you are telling me is that the notes JVM will run the application as long as I make sure that I point it to the Notes JVM and not let it use the Sun JVM?
Everyone here uses the same version of Notes so if I can tell the application to use the Notes JVM then I shouldn’t have any problems running it on any of the pc’s?
Am I understanding this correctly?
Again, I’m sorry for the confusion I’m only in my second week as an intern here.
Many Thanks,
Chad
Subject: RE: Running a stand alone Java app
Chad SC said:but I was told that the Notes JVM would not run a stand alone Java application, which didn’t make any sense to me
It will run an application just fine. The issue is one of “can” vs. “supported”. But the JRE on Notes 6.0x clients is simply a slightly stripped down version of the IBM JRE for Win32. And the stripped pieces are unnecessary in most cases (mostly plugin related).
Like I said before, older versions of the Notes client did not ship with the java.exe executable, so it was impossible to run a Java application using the JVM in the client.
What you are telling me is that the notes JVM will run the application as long as I make sure that I point it to the Notes JVM and not let it use the Sun JVM?
Yes, that’s exactly what I’m saying ![]()
I shouldn’t have any problems running it on any of the pc’s?
No, it should be find, just mind your environment assumptions in your Java app. With a community of that many clients, you have ineveitable differences, users like to “customize” things.
Good luck.
–Joe
Joseph Millar
Principal Software Engineer
Brightline Technology
Subject: RE: Running a stand alone Java app
Thank you.
That is very helpful information.
Chad