Java and Windows
Running pre compiled Java files on a Windows is'nt always easy.
Don't use a java2exe converter, Java is platform independent and thats the way we going to keep it.
There are issues in running java code in a Windows environment.
First of all Windows needs JRE Java Runtime Environment installed.
Execute class files:
You probably got your class files sorted in packages.
Let's say you have a file structure like this:
c:\myprogram\myPackage\handler\MyHandler.class
c:\myprogram\myPackage\Program.class
The c:\myprogram is the root folder for your files.
Create a shortcut in your myprogram folder with the link to
c:\WINDOWS\system32\java.exe. Name the shortcut whatever you want.
Right-click the shortcut and choose properties.
In the target write:
c:\WINDOWS\system32\java.exe myPackage.Program
In the start in box, type: c:\myprogram, click ok.
Now you can start your program by clicking the new shortcut we created.
NOTE: By referencing c:\WINDOWS\system32\java.exe you also get the command window. By changing this to c:\WINDOWS\system32\javaw.exe, you can start your program without the command window. Note the "w" in javaw.exe.