OS2 World.Com Forum

Subject  :  Java for OS/2 in a Virtual Machine!
Author  :  Belt06 beltran6b@yahoo.com
Date  :  25 Sep, 2006 on 18:01
I need to create an software application in java languaje, but my operating system is Windows XP. I can install a Microsoft Virtual PC on Windows XP and then OS/2 Warp 3 and run java in OS/2 Warp 3?

I need to create a easy interfaz application. Another recommend languaje in OS/2 Warp 3 ? Java, Visual,....??


Subject  :  Re:Java for OS/2 in a Virtual Machine!
Author  :  Fahrvenugen
Date  :  25 Sep, 2006 on 19:05
While it is possible to run either Warp 3 or Warp 4 in Microsoft VirtualPC, why not just install the Java SDK on your Windows machine?

You can download Sun's Java Standard Edition SDK at:

http://java.sun.com/javase/


Subject  :  Re:Java for OS/2 in a Virtual Machine!
Author  :  Belt06 beltran6b@yahoo.com
Date  :  26 Sep, 2006 on 19:38

Fahrvenugen (25 Sep, 2006 19:05):
While it is possible to run either Warp 3 or Warp 4 in Microsoft VirtualPC, why not just install the Java SDK on your Windows machine?

You can download Sun's Java Standard Edition SDK at:

http://java.sun.com/javase/[/quote]


******************************
The problem is that I need the application software to run in the OS/2 Warp 3 in other machine, but I need to programm in my desktop computer for then run the app in the OS/2 machine.

I have Windows Xp, then install a virtual machine on Windows and in this virtual machine I install OS/2, and in OS/2 I need to install Java 1.1.8 for programm the software application. Is this posible?


Subject  :  Re:Java for OS/2 in a Virtual Machine!
Author  :  Blonde Guy
Date  :  26 Sep, 2006 on 22:43
You can run IBM Java 1.1.8 under OS/2 Warp 3 with FixPak 32 or higher.

It does not matter if it is in a virtual machine or not.

Neil


Subject  :  Re:Java for OS/2 in a Virtual Machine!
Author  :  Martin
Date  :  26 Sep, 2006 on 23:41
It will be desirable if you can use OS/2 Warp 4.52 (aka Convenience Pack 2) , or if you can buy eComStation. Which are the higher OS/2 versions available. Warp 4.52 will end his life on Dec 2006, while eComStation is still supported.

Them if you need to code on Windows XP, make your java application with Java version 1.3.1 or 1.4.2_09 to be sure it is compatible.

On the OS/2 box (or virtual machine) install the Java RunTime enviroment. On the first part of the OS/2 and Java corner you can find the JRE available for OS/2-eComStation:
http://www.os2world.com/java/

Download Java 1.4.2_09 for OS/2 at:
JRE: http://download.innotek.de/javaos2/142_09/install.exe
SDK: http://download.innotek.de/javaos2/142_09/install_sdk.exe
I think you also need to install the InnoTek Runtime for OS/2.
http://www.innotek.de/products/innowin/innowingeneral_e.html

Hope this helps.


Subject  :  Re:Java for OS/2 in a Virtual Machine!
Author  :  Fahrvenugen
Date  :  27 Sep, 2006 on 04:08

Belt06 (26 Sep, 2006 19:3:

The problem is that I need the application software to run in the OS/2 Warp 3 in other machine, but I need to programm in my desktop computer for then run the app in the OS/2 machine.

I have Windows Xp, then install a virtual machine on Windows and in this virtual machine I install OS/2, and in OS/2 I need to install Java 1.1.8 for programm the software application. Is this posible?


If the target machine is OS/2 Warp 3, then you'll need to code for a Java 1.1.8 target, as indicated by Blonde Guy. Also as mentioned, you'll need to install at least Fixpak 32 on Warp 3 (preferably Fixpak 40).

Newer versions of Java such as Java 1.4.2 or Java 1.3.1 require OS/2 Warp 4 or eCS.

You can download the older Java 1.1.8 from Hobbes at:

http://hobbes.nmsu.edu/cgi-bin/h-browse?sh=1&dir=//pub/java/system


Subject  :  Re:Java for OS/2 in a Virtual Machine!
Author  :  Stuart srtgray@clara.net
Date  :  29 Sep, 2006 on 21:27
Call me naive, but isn't Java supposed to be portable? In other words, write the thing on your Windows machine, make sure it is compatible with earlier versions (1.1.8 for Warp 3) and then release it to run on the OS/2 JVM.

Stuart


Subject  :  Re:Java for OS/2 in a Virtual Machine!
Author  :  Roger
Date  :  01 Oct, 2006 on 06:24

Stuart (29 Sep, 2006 21:27):
Call me naive, but isn't Java supposed to be portable? In other words, write the thing on your Windows machine, make sure it is compatible with earlier versions (1.1.8 for Warp 3) and then release it to run on the OS/2 JVM.
Stuart

Belt06,

Stuart is on the right track! This and the suggestions from Fahrvenugen, Martin and Blonde Guy should encourage you give your plan a try. I was curious myself and decided to run some tests. My setup sounds similar to yours, except I run WinXP and OS/2 Warp 4.5.2 on separate machines on a LAN. Here is my testbed:

*Laptop with Win XP and Java 1.4.2
*Desktop with OS/2 Warp 4.52 and Java 1.1.8, 1.3.1, 1.4.1
*PropertiesTest.java (attached) from "Java How to Program", Third Edition. This program displays a Swing-type screen with buttons, plus it reads and writes to a sequential data file (props.dat).

For Test 1, I compiled on WinXP and copied the .class files and data file to OS/2. Note: I'm using FTP for the transfer. Documentation for Virtual PC 2004 says you can create a shared folder to copy files between the Virtual PCs. Otherwise, you can zip the compiled classes to a diskette for the transfer.

Results: The program ran fine with Java 1.3.1. I could read the props.dat file, add properties and write the file. With Java 1.1.8, it worked until I hit the Store button to save the file. I got this error:
"Can't find class PropertiesTest or something it requires" and noticed that it deleted all the lines in my props.dat file. Keep a copy.

For Test 2, I compiled on WinXP with this parameter "-target 1.1". This will ensure the generated files are compatible with 1.1 VMs. See http://java.sun.com/j2se/1.3/docs/tooldocs/solaris/javac.html

Results: The program ran fine under Java 1.3.1. With Java 1.1.8, the program failed again when I hit the Store button, but this time I got a traceback showing where the code failed. Good thing I kept a copy of props.dat.

Researched the error and found that the "store" method in the Properties class did not exist in Java 1.1.8. The Java 1.1.8 equivalent is "save", but that was deprecated in favor of the store method as of Java 1.2.

For Test 3, I changed table.store to table.save in line 103, compiled again on Win XP, this time adding these parameters: -target 1.1 -deprecation

Results: The Win XP Java 1.4.2 compiler now shows a message -
PropertiesTest.java:103: warning: save(java.io.OutputStream,
java.util.Properties has been deprecated
table.save( output, "Sample Properties" );

However, the compiler produced executable code and I was able to run it successfully on OS/2 with Java 1.1.8, 1.3.1 and 1.4.1.

Hopefully, you are encouraged by this to proceed with your plan. Remember to format your Virtual C: drive as HPFS when you install Warp 3 with FixPak 32, so you can use long file names. Attached is the source, data file and screen print. Let us know how it works.

Good Luck,

Roger


Powered by UltraBoard 2000 <www.ub2k.com>