• Welcome to OS2World OLD-STATIC-BACKUP Forum.
 

News:

This is an old OS2World backup forum for reference only. IT IS READ ONLY!!!

If you need help with OS/2 - eComStation visit http://www.os2world.com/forum

Main Menu

Can you have both golden code java and java 6 installed?

Started by os2monkey, 2012.02.26, 08:01:34

Previous topic - Next topic

os2monkey

I am working on a new ECS install and have a registered copy of the older golden code java.
But I was reading the readme for the new java 6 and it seems to saying they can not be both installed?:

Also make sure there are no traces of other Java installations in the
environment because this is known to make problems (in particular, this means
that the CLASSPATH/JAVA_HOME/SWING_HOME environment variables should not be
set).

Alternatively, you may add this subdirectory to PATH and LIBPATH statements
of your CONFIG.SYS (and reboot) to make the given Java installation the
default one.


If I had to choose I would go with java 6 now but just curious if anyone has experience if it's possible to install them both?

Joop

Yes, you can. No trace means you have to eliminate config.sys settings in your setup, not in your config.sys, that's all. I have four Java versions next to each other without problems. You have to start the Java programs by means of a CMD FILE. All settings of the cmd file are only valid for the session the cmd started, ie, your settings in the config.sys are not tweaked. In the cmd file you have to start with some set lines like "set CLASSPATH=". After eliminating your config.sys setup you can go on with the setup for your Java version. As an example here my cmd file to start Image-J.

@echo off
set path=i:\JAVA\JAVA160\bin
set BEGINLIBPATH=i:\JAVA\JAVA160\bin
set CLASSPATH=
I:
cd I:\DTP\ImageJ
java -Xmx512m -jar ij.jar

That's all there is and it works. In this way you can setup any Java version you like and if the program demands. I have some programs which won't work with Java 6, but works with Java 1.1.

Success with your setup.

Joop

ehtron

Sorry,
thats not the real way to set different java versions.. 
NO java tags into the config,sys..  that makes trouble... 

here a german acour .. (you can use babelfish to translate)

http://www.ehlertronic.de/ecs-os2/tipps-tricks/java-config.html

regards

Pete

Hi

I have no mention of java in my config.sys file except for

SET CLASSPATH=.\.;L:\OS2\JAVAAPPS\LVMGUI.ZIP;L:\TCPIP\java;

and

SET JAVA_HIGH_MEMORY=1

I use both java6 and java142 without problems.


Neither of the above require Path or LibPath entries as both are capable of finding out where they are installed and where their support files are.

Most of my java apps are started from a program object; here is an example for JPhotoBrush:-

Path and filename: J:\JAVA\OPENJDK6\BIN\JAVAW.EXE
Parameters: -jar J:\Java\jphotobrush\jphotobrush.jar

If a java app requires more Parameters, eg a long classpath, in order to run I simply create a cmd file instead of a program object and use the cmd file to start the app.


Regards

Pete