Java on OS/2: Frequently Asked Questions

This is an attempt to bring together information on the Java language for OS/2. Note: Nothing here is official IBM information. Opinions expressed here are strictly my own.

This page is very badly out of date right now. I hope to get the FAQ revised soon. So many items may no longer be correct!
See this FAQ for more up to date information

Q. First off, what is Java?

A. For general information on Java, check out the comp.lang.java FAQ. This is a very good introduction that contains pointers to other sources of information.

Q. How do I get a version of Java for OS/2?

A. Java 1.3.1 and 1.1.8 are available from the IBM Software Choice site. The 1.3.1 version requires a subscription to Software Choice.

Q. How do I get a Java-enabled browser for OS/2?

A. The Software Choice link above has two options, Netscape 4.61 (which is free) and the new IBM Web Browser for OS/2 V1.2, based on Mozilla source (which requires a subscription). Also, Opera offers a beta version that reports to support Java.

Q. I got Netscape for OS/2, but now some of my other Java stuff won't work. What happened?

A. The final (and beta 2 release) of Netscape installs the 1.0.2 Java runtime, and may add a second CLASSPATH statement to your CONFIG.SYS if you already have Java installed. You probably need to merge the two statements together, putting anything specific to your system after the new CLASSPATH. If you do not have the new Java Developers Kit installed, make sure any references to the old kit come after the Netscape stuff.

Q. Some applets still crash Netscape. What can I do?

A. Try disabling the just-in-time (JIT) compiler. Go to Options, Security Preferences, and check Disable Java Compiler. This choice seems to be checked on installation, disabling the JIT.

Q. I don't have "Merlin." Will I have Java support in Netscape for OS/2 under Warp version 3?

A. I haven't used this combination myself. But I'm assured it does work.

Q. What comes with the JDK for OS/2?

A. Included are the java interpreter, compiler, and an applet viewer (which is used to test applets that would normally be viewed by a Web browser), and all of the support files and classes needed to develop Java applets. NOT included is a Web browser (see above). The Java 1.1.4 JDK also includes other tools for working with the new .jar file format and for signing applets.

Q. How far along is the code?

A. The latest release of the JDK is version 1.1.4 of Java.

Q. Can I use both versions of Java on the same computer?

A. You can run Java applications with Java 1.02 by giving the full path to the old java, e.g. C:\javaos2\bin\java MyClass. Also see the next question.

Q. How can I run Java 1.1 with Netscape/2?

A. Get the latest version of Netscape for OS/2, which can use Java 1.1 and also comes with a utility (not tested here) to switch between the old and new versions of Java. Note that this version still carries the "2.02" number. To determine the exact version number, select "Help, About Netscape ... " from the menu of your Netscape. The title bar will display a string, including a date. Mine says "Version 2.02-980101". I'm not sure if there is a more recent build now.

Q. Can I run the Java Web Server from Sun on OS/2?

A. Yes. Officially, it is only supported on Windows NT and Solaris, but most features of the server appear to work fine on OS/2, in non-secure mode. The secure Web features appear to use native methods and therefore do not work. Most important, servlets seem to work fine. My limited experience has been that servlets work better here than in the IBM Internet Connection Server, (now called Lotus GoServer), but the IBM product may be better now than it was.

I downloaded the Unix version of the Java Web Server and unpacked it, and run it with the following commands:

SET CLASSPATH=F:\JavaServer\servlets;F:\JavaServer\lib\classes.jar;F:\JavaServer\lib\i18n.jar;F:\JavaServer\lib\rt.jar;%CLASSPATH%
java -Dserver.root=F:\JavaServer\  sun.security.Login sun.security.AuthGUI sun.server.ServerProcess

This is a simplied version of the Unix script for using the server without its included runtime. It omits some of the garbage-collection and memory commands from the original, which you might want to try using. Note: The Java Web Server requires Java 1.1 or later runtime.

Q. What happened to the bug information that used to be in this FAQ?

A. A lot of it is now outdated. For a while, the best source on bugs in the OS/2 port that I had seen was this portion of the Corrigan Computers FAQ, but that information is now out of date, too. IBM, unfortunately, does not seem to have its own posted bug list. Also see Sun's bug list for version 1.0.2.

Q. How do I capture debugging messages from an application started with javapm?

A. With the July 2 and later versions of the JDK, start the application with the new -cons option:


        javapm -cons MyClass

This will start up a little console that will display both the standard output and standard error streams.

Another option that still works: You can redirect the standard out and standard error streams with the following command:

        javapm myap > output.txt 2> error.txt

Thanks to Phil Russell for pointing this out. (Note: this procedure also works for standard output for any PM app, not just Java ones.

Q. How about debugging messages from my applet, run under the applet viewer?

A. Standard output from the applet viewer's applets goes to a file; in recent versions of the JDK you can specify this file's location with the statement:


SET JAVA_WEBLOGS=C:\JAVAOS2

adjusting the directory as needed.

But the newest (July 2) version of the JDK also allows you to use the same -cons option as with javapm.

Q. When I try setting the file for weblogs, the applet viewer won't start, instead saying it is unable to create the directory. What went wrong?

A. Check to make sure there is no trailing slash on the statement. The applet viewer does not like this slash and will refuse to create or use the directory.

Q. Why is this FAQ so sketchy?

A. So tell me what's missing! I am always looking for more information (and impressions) on Java running on OS/2. Please email me webmaster@3cat.com with any information you'd like to see in the FAQ.

Q. Are there any other sources of information?

A. Yes. Please see the resources page.


Last revised Sept. 1, 2002, but many items date to Sept. 23, 1998 by Mark H. James
OS/2 Java Home Page.
three cat home page