by

Installing Sun's« Java«

VWP«




Information

D Java« ist ein plattformⁿbergreifendes System, das es m÷glich macht, unter Java« entwickelte Software auf jedem beliebigen Computersystem laufen zu lassen, fⁿr das die Java Virtual Machine«, die von Sun« kostenlos zur Verfⁿgung gestellt wird, umgesetzt wurde. Leider ist die Installation von Java« nach wie vor alles andere als einfach. E Java⌐ is a platform-independent system that allows to run the same software on every computer system. Only the Java Virtual Machine⌐, that is available from Sun⌐ for free, has to be installed before. The only problem is the installation - it isn't as simple as it should be.
Deswegen soll hier noch mal eine kurze Anleitung gegeben werden. Es wird dabei speziell auf die Installation unter Wind*ws eingegangen. Auf allen anderen Computer- und Betriebssystemen erfolgt die Installation enstsprechend. Because of this, additional to the installation-notes at Sun's⌐ Java⌐-website, it will be described here again. As an example we use the installation under Wind*ws. For all other operating systems it has to be done in a similar way.
Was alles installiert werden mu▀, um Programme von VWP starten zu k÷nnen, hΣngt dabei von der Programmversion ab: Soll das kleinere Paket fⁿr Java« & JFC«/Swing« heruntergeladen werden, so ist, wie nachfolgend beschrieben, sowohl die JRE« als auch JFC«/Swing« zu installieren. Wird das gr÷▀ere Paket fⁿr Java« (JRE« only) verwendet, ist nur die JRE« erforderlich. How much has to be installed depends on the program version VWP offers: If you prefer to download the smaller version for Java⌐ & JFC⌐/Swing⌐ you have to install the JRE⌐ and JFC⌐/Swing⌐. If you use the bigger version Java⌐ (JRE⌐ only), only the JRE⌐ is needed.



Kaffe« & Swing« for BeOS

Installing Kaffe«

D Da fⁿr BeOS« noch keine offizielle Java«-Portierung existiert, wird hier die Installation von Kaffe«, einem Open Source Javaclone, beschrieben. Als erstes wird das Kaffe-Paket BeKaffe package ben÷tigt. Dieses kann hier kostenlos heruntergeladen werden: E Because there doesn`t exists an official port of Java« for BeOS«, the installation of Kaffe wil be described here. The BeKaffe package is an Open Source Javaclone and can be downloaded here:
http://bekaffe.netpedia.net/files.html
Das Archiv entpackt sich selbst und die Daten landen in "/home". Im Verzeichnis "/home/bekaffe/share/kaffe" befindet sich jetzt die Datei "Klasses.jar". Es wird empfohlen, diese nach "/system/lib" zu kopieren, damit sie vom JavaRunner und von anderen Java-Applikationen problemlos gefunden werden kann. The archive will self-extract and the files normally will be copied to "/home". In the directory "/home/bekaffe/share/kaffe" the file "Klasses.jar" can be found. To use the JavaRunner without problems and to make it easier for applications to find it, it`s recommended to copy this file to "/system/lib".



Installing JFC« / Swing« for Kaffe«

D Viele Java«-Programme (darunter auch diejenigen von VWP, die in der Version Java« & JFC«/Swing« vorliegen) nutzen Swing«. Dieses Paket mu▀ als nΣchstes installiert werden. Es wird ebenfalls von Sun« kostenlos zur Verfⁿgung gestellt und kann hier als ZIP-File heruntergeladen werden: E Much Java«-applications (and VWP's program-versions wich are available for Java⌐ & JFC⌐/Swing⌐) use Swing⌐. This is included in another package and can be downloaded as a zip-file also for free:
http://java.sun.com/products/jfc/download.html
D Dieses Paket enthΣlt alle Klassen, die fⁿr eine komfortable OberflΣche unter Swing« n÷tig sind. Es genⁿgt unter BeOS« allerdings, die Datei "swingall.jar" nach "/system/lib" zu kopieren. E This package includes all necessary classes for the graphical user interfaces using Swing⌐. Under BeOS« you normally only need the file "swingall.jar". Simply copy it to "/system/lib".




Java« & Swing« for Linux

Installing the Java Runtime Environment« 1.2.x

D Als erstes wird die Java Runtime Environment« ben÷tigt. Diese kann bei Sun« in mehreren 1,4 MBytes gro▀en Teilen kostenlos heruntergeladen werden: E First you have to download the Java Runtime Environment⌐. This package is available for free and can be downloaded in different disk-sized pieces here:
http://java.sun.com/products/jdk/1.2/jre/download-linux.html
Die einzelnen Teile mⁿssen zuerst zusammengesetzt, das sich daraus ergebende TAR-Archiv entpackt, nach /usr/lib kopiert und ein Link darauf gesetzt werden. Das kann von Hand geschehen oder aber mit Hilfe des Scriptes "install_jre" das hier heruntergeladen werden kann.
Um das Script benutzen zu k÷nnen, ist dieses in das gleiche Verzeichnis wie die heruntergeladenen Teile zu kopieren und dort zu starten.
Now you have to put the pieces together, unpack the resulting TAR-archive, copy the extracted directories to /usr/lib and set a link from /usr/lib/jre to usr/lib/jre1.2.2. This can be done manual or by executing "install_jre" which can be downloaded here.
To use this script, copy it into the same directory like the downloaded pieces and execute it there.
Soll der JavaRunner verwendet werden, so ist die Installation hier beendet. Ansonsten ist noch der Standardsuchpfad zu verΣndern. If you like to use the JavaRunner, the installation is finished now. If not, you have to set the environment variable PATH.
Hat die Linux-Distribution zuvor kein Java enthalten, so mu▀ als erstes der Standardsuchpfad um den Pfad zu den ausfⁿhrbaren Programmen der JRE gesetzt werden. Das geschieht in der Datei "/etc/profile". Dort mu▀ bereits ein Eintrag mit der Variablen PATH existieren. An dessen Zeilenende ist der Pfad nach /usr/lib/jre/bin durch ":" getrennt anzufⁿgen. Anschlie▀end mⁿ▀ten diese Zeilen etwa so aussehen: If your Linux didn't owned java before you have to set the environment variable PATH. This has to be done in "/etc/profile" by adding /usr/lib/jre/bin separated by a ":" to the existing PATH-entry. After this step these lines have to look like this:
      PATH=/bin:/...:/usr/lib/java/bin
...
export PATH
Anschlie▀end wird der Pfad zu den JAR-Archiven ben÷tigt. Das geschieht wieder in der Datei "/etc/profile". Am Ende des PATH-Eintrages ist der Pfad nach /usr/lib/jre/lib durch ":" getrennt anzufⁿgen. Anschlie▀end mⁿ▀ten diese Zeilen etwa so aussehen: Now you have to set the environment variable PATH to the JAR-archives. This has to be done in "/etc/profile" by adding /usr/lib/jre/lib separated by a ":" to the existing PATH-entry. After this step these lines have to look like this:
      PATH=/bin:/...:/usr/lib/java/bin:/usr/lib/java/lib
...
export PATH



Installing JFC« / Swing« for JRE 1.2.x

D Viele Java«-Programme (darunter auch diejenigen von VWP, die in der Version Java« & JFC«/Swing« vorliegen) nutzen Swing«. Dieses Paket mu▀ als nΣchstes installiert werden. Es wird ebenfalls von Sun« kostenlos zur Verfⁿgung gestellt und kann hier als ZIP-File heruntergeladen werden: E Much Java«-applications (and VWP's program-versions wich are available for Java⌐ & JFC⌐/Swing⌐) use Swing⌐. This is included in another package and can be downloaded as a zip-file also for free:
http://java.sun.com/products/jfc/download.html
D Dieses Paket enthΣlt alle Klassen, die fⁿr eine komfortable OberflΣche unter Swing« n÷tig sind. Es genⁿgt unter Linux allerdings, die Datei "swingall.jar" z.B. nach "/lib" zu kopieren. E This package includes all necessary classes for the graphical user interfaces using Swing⌐. Under Linux you normally only need the file "swingall.jar". Simply copy it to "/lib".
Damit diese von der JVM« gefunden werden, wenn der JavaRunner nicht benutzt wird, mu▀ die Umgebungsvariable PATH um dem Pfad zu dem kopierten JAR-Archiv erweitert werden. Das geschieht wieder in der Datei "/etc/profile". Hier ist PATH um den Pfad "/lib" zu erweitern, so das der Eintrag dann etwa so aussieht: To use it correctly with the JVM⌐ if you don't use the JavaRunner you have to extend the settings of the environment-variable PATH to the path to the copied JAR-archive. This has to be done also in the file "/etc/profile" by adding "/lib". Finally the complete entry has to look like this:
      PATH=/bin:/...:/usr/lib/java/bin:/usr/lib/java/lib:/lib
...
export PATH




Installing the Java Runtime Environment« 1.1.x

D Als erstes wird die Java Runtime Environment« ben÷tigt. Diese ist in den allermeisten Linux-Distributionen schon enthalten und mu▀ deshalb nicht extra besorgt werden. Dabei handelt es sich zumeist um die Version 1.1.7. E In first step the Java Runtime Environment⌐ is needed. This package ist part of most Linux-distributions. In most cases it is version 1.1.7.
Auch ist der Standardsuchpfad bereits auf die JRE gesetzt, so das hier nichts weiter verΣndert werden mu▀. Dieser zeigt normalerweise auf das Java«-Paket in "/usr/lib/java". The required environment-variable PATH normally is also set and doesn't has to be changed. It normally points to the Java«-package in "/usr/lib/java".
Es mu▀ nur noch die Umgebungsvariable CLASSPATH gesetzt werden, damit die Basisklassen gefunden werden. Das geschieht am besten in der Datei "/etc/profile" durch Hinzufⁿgen folgender Zeilen: You only have to set the environment-variable CLASSPATH. This variable has to point to the base-classes and should be set in "/etc/profile" by adding these lines:
      CLASSPATH=/usr/lib/java/lib/classes.zip
export CLASSPATH



Installing JFC« / Swing« for JRE 1.1.x

D Viele Java«-Programme (darunter auch diejenigen von VWP, die in der Version Java« & JFC«/Swing« vorliegen) nutzen Swing«. Dieses Paket mu▀ als nΣchstes installiert werden. Es wird ebenfalls von Sun« kostenlos zur Verfⁿgung gestellt und kann hier als ZIP-File heruntergeladen werden: E Much Java«-applications (and VWP's program-versions wich are available for Java⌐ & JFC⌐/Swing⌐) use Swing⌐. This is included in another package and can be downloaded as a zip-file also for free:
http://java.sun.com/products/jfc/download.html
D Dieses Paket enthΣlt alle Klassen, die fⁿr eine komfortable OberflΣche unter Swing« n÷tig sind. Es genⁿgt unter Linux allerdings, die Datei "swingall.jar" z.B. nach "/lib" zu kopieren. E This package includes all necessary classes for the graphical user interface using Swing⌐. Under Linux you normally only need the file "swingall.jar". Simply copy it to "/lib".
Damit diese von der JVM« und auch vom JavaRunner gefunden werden, mu▀ die Umgebungsvariable CLASSPATH um dem Pfad zu dem kopierten JAR-Archiv erweitert werden. Das geschieht wieder in der Datei "/etc/profile". Hier ist CLASSPATH um den Pfad "/lib/swingall.jar" zu erweitern, so das der Eintrag dann so aussieht: To use it correctly with the JVM⌐ and with the JavaRunner, you have to extend the settings of the environment-variable CLASSPATH with the path to the copied JAR-archive. This has to be done also in the file "/etc/profile" by adding "/lib/swingall.jar". Finally the complete entry has to look like this:
      CLASSPATH=/usr/lib/java/lib/classes.zip:/lib/swingall.jar
export CLASSPATH




Java« & Swing« for Wind*ws

Installing the Java Runtime Environment« 1.2.x

D Als erstes wird die Java Runtime Environment« ben÷tigt. Diese kann bei Sun« in mehreren 1,4 MBytes gro▀en Teilen kostenlos heruntergeladen werden: E First you have to download the Java Runtime Environment⌐. This package is available for free and can be downloaded in different disk-sized pieces here:
http://java.sun.com/products/jdk/1.2/jre/download-windows.html
Die einzelnen Teile mⁿssen zuerst zusammengesetzt, das sich daraus ergebende Setup-Programm gestartet und anschlie▀end die Umgebungsvariable PATH verΣndert werden. Das kann von Hand geschehen oder aber mit Hilfe des Scriptes "Install_JRE1.2.bat" das hier enthalten ist. Now you have to put the pieces together, execute the resulting setup-program and edit the environment-variable PATH. This can be done manual or by executing "Install_JRE1.2.bat" which is included here.
ACHTUNG! Damit das Script korrekt arbeitet, dⁿrfen keinerlei VerΣnderungen an den vom Setup-Programm vorgeschlagenen Installationspfaden vorgenommen werden! Auch mⁿssen sich die heruntergeladenen Teile und das Script im gleichen Verzeichnis befinden! NOTE! To use the Script correctly you don't have to change any of the installation-paths suggested by the setup-program! Additional the downloaded pieces and the script have to be saved into the same directory!



Installing JFC« / Swing« for JRE« 1.2.x

D Viele Java«-Programme (u.a. diejenigen von VWP, die in der Version Java« & JFC«/Swing« vorliegen) nutzen Swing«. Dieses Paket mu▀ als nΣchstes installiert werden. Es wird ebenfalls von Sun« kostenlos zur Verfⁿgung gestellt und kann hier heruntergeladen werden: E Different Java-applications (including all versions of VWP-software for Java⌐ & JFC⌐/Swing⌐) use Swing⌐. This is included in another package and can be downloaded also for free:
http://java.sun.com/products/jfc/download.html
D Dieses Paket enthΣlt alle Klassen, die fⁿr eine komfortable OberflΣche unter Swing« n÷tig sind. Damit diese von der JVM« und auch vom JavaRunner gefunden werden, mu▀ fⁿr JRE 1.2.x die Umgebungsvariable PATH um den Pfad zu den in diesem Paket enthalten JAR-Archiven erweitert werden. E This package includes all necessary classes for the graphical user interface using Swing⌐. To use it correctly with the JVM⌐ and with Java«-applications which have to be executed using the JavaRunner, you have to add the path to the included JAR-archives.
Das kann von Hand geschehen oder aber mit Hilfe des Scriptes "Swing.bat" das hier enthalten ist. This can be done manual or by executing "Swing.bat" which is included here.
ACHTUNG! Damit das Script korrekt arbeitet, dⁿrfen keinerlei VerΣnderungen an den vom Setup-Programm vorgeschlagenen Installationspfaden vorgenommen werden! Weiterhin mu▀ sich das Setup-Programm und das Script im gleichen Verzeichnis befinden! NOTE! To use the Script correctly you don't have to change any of the installation-paths suggested by the setup-program! Additional the setup-program and the script have to be copied to the same directory!



Installing the old Java Runtime Environment« 1.1.x

D Als erstes wird die Java Runtime Environment« ben÷tigt. Diese kann bei Sun« kostenlos heruntergeladen werden und ist fⁿr alle Programmversionen, die nicht in nativem Code vorliegen (das ist derzeit nur bei Amiga«-Software der Fall) zwingend erforderlich: E First you have to download the Java Runtime Environment⌐. This package ist required for all program versions (except the Amiga⌐-software, which is native Code). This package is available for free here:
http://java.sun.com/products/jdk/1.1/jre/
Dieses Paket enthΣlt das ausfⁿhrbare Programm "JRE.EXE". Damit dieses ohne lange Pfadangaben gefunden werden kann, und damit der JavaRunner, der ein ausfⁿhrbares Programm ist und einigen systemspezifischen Paketen beiliegt, korrekt funktioniert, mu▀ der Standardsuchpfad verΣndert werden. Das geschieht am besten in der "AUTOEXEC.BAT". Hier mu▀ folgende Zeile eingefⁿgt werden: This package includes the executeable program "JRE.EXE". To use it without long path names and to make the JavaRunner, which is part of some system-specific versions of VWP's Java⌐-software, work correct, the environment variable PATH has to be changed. To do that you have to edit your "AUTOEXEC.BAT". Here you have to insert the following line:
SET PATH=C:\Program Files\Javasoft\JRE\1.1\bin;%PATH%
Dieses Paket enthΣlt auch alle Klassen und Pakete, die fⁿr Java« zwingend erforderlich sind. Damit diese von der JVM« und vom JavaRunner gefunden werden, mu▀ die Umgebungsvariable CLASSPATH auf das in diesem Paket enthaltene JAR-Archiv gesetzt werden. Das geschieht wieder in der "AUTOEXEC.BAT". Die neu einzufⁿgende Zeile mu▀ dann z.B. folgenderma▀en aussehen: This package also includes all neccessary classes and packages for Java⌐. To use it correctly with the JVM⌐ and with the JavaRunner, you have to set the environment variable CLASSPATH to the JAR-archive included in this package. This has to be done also in the file "AUTOEXEC.BAT". The lines which has to be added could look like this:
SET CLASSPATH="C:\Program Files\Javasoft\JRE\1.1\lib\rt.jar";%CLASSPATH%



Installing JFC« / Swing« for JRE« 1.1.x

D Java«-Programme von VWP, die in der Version Java« & JFC«/Swing« vorliegen, nutzen Swing«. Dieses Paket mu▀ als nΣchstes installiert werden. Es wird ebenfalls von Sun« kostenlos zur Verfⁿgung gestellt und kann hier heruntergeladen werden: E VWP's program-versions for Java⌐ & JFC⌐/Swing⌐ use Swing⌐. This is included in another package and can be downloaded also for free:
http://java.sun.com/products/jfc/download.html
D Dieses Paket enthΣlt alle Klassen und Pakete, die fⁿr eine komfortable OberflΣche unter Swing« n÷tig sind. Damit diese von der JVM« und vom JavaRunner gefunden werden, mu▀ die Umgebungsvariable CLASSPATH um dem Pfad zu dem in diesem Paket enthalten JAR-Archiv erweitert werden. Das geschieht wieder in der "AUTOEXEC.BAT". Die neu einzufⁿgende Zeile mu▀ dann z.B. folgenderma▀en aussehen: E This package includes all necessary classes and packages for the graphical user interface using Swing⌐. To use it correctly with the JVM⌐ and with the JavaRunner, you have to add the path to the included JAR-archive to the existing environment variable CLASSPATH. This has to be done also in the file "AUTOEXEC.BAT". The line which has to be added could look like this:
SET CLASSPATH=C:\Programme\Swing-1.1.1\swingall.jar;%CLASSPATH%




Troubleshooting

D Passiert nach dem Start des JavaRunners, bzw. nach dem Start des Scriptfiles nichts, so ist eventuell der Standard-Suchpfad falsch gesetzt worden oder die Definition des CLASSPATH ist unvollstΣndig. Um eine Fehlermeldung zu erhalten, mu▀ der JavaRunner bzw. das Startscript von einer Konsole aus gestartet werden. Es wird dann eine Fehlermeldung ausgegeben, die Aufschlu▀ ⁿber die Ursache gibt.
Alternativ kann der Befehl zum Starten auch direkt eingegeben werden:
E If nothing happens after starting the JavaRunner or the script file, something in the installation is wrong. To find out if the variable PATH or CLASSPATH was set wrong, an error message will be needed. To get this, you have to run the script or the JavaRunner using a console.
Instead of this you can start it directly using following command:
JRE 1.1.x:
java -classpath programname.jar;%CLASSPATH% programname
or
jre -classpath programname.jar;%CLASSPATH% programname

JRE 1.2.x
java -classpath programname.jar programname


Folgende typischen Fehlermeldungen sind m÷glich:


Following error messages are possible:
Command not found
Das Programm "JRE.EXE" oder "JAVA.EXE" konnte nicht gefunden werden.
Es ist zu ⁿberprⁿfen, ob der Standardsuchpfad PATH zu den BinΣr-Daten korrekt gesetzt wurde.
The executeable "JRE.EXE" or "JAVA.EXE" couldn't be found.
Please check if the variable PATH was set to a correct path to the binaries.


Couldn't find java/lang/thread
Das JAR-Archiv der JRE« "rt.jar" konnte nicht gefunden werden.
Es ist zu ⁿberprⁿfen, ob die Variable CLASSPATH (JRE 1.1.x) oder PATH auf diese Datei bzw. ihr Verzeichnis gesetzt wurde.
The JAR-archive "rt.jar" of the JRE« couldn't be found.
Please check if the variable CLASSPATH (JRE 1.1.x) or PATH (JRE1.2.x) was set correct to this file or to its directory.


Couldn't find com/sun/java/swing/...
or
Couldn't find javax/swing/...
Das Swing«-JAR-Archiv "swingall.jar" konnte nicht gefunden werden.
Es ist zu ⁿberprⁿfen, ob die Variable CLASSPATH (JRE 1.1.x) bzw. PATH (JRE 1.1.x) auf diese Datei bzw. ihr Verzeichnis gesetzt wurde.
The JAR-archive "swingall.jar" of the Swing« package couldn't be found.
Please check if the variable CLASSPATH (JRE 1.1.x) or PATH (JRE 1.2.x) was set to a correct path to the file "swingall.jar" or to its directory.




The easier way to execute Java« programs: The JavaRunner

D Um m÷gliche Fehler in der Environment-Variablen CLASSPATH auszugleichen und um das Starten eines Java«-Programmes so einfach wie m÷glich zu gestalten, bietet VWP das Programm JavaRunner an. Dieses startet Java«-Programme, die in Form von JAR-Archiven vorliegen, weitgehend automatisch. E To suppress errors which could be made in the settings of the environment variable CLASSPATH and to make it as easy as possible to run a Java« program, VWP offers the JavaRunner.
Der JavaRunner ben÷tigt lediglich eine Textdatei "java.run", die den Namen der Haupt-Klasse enthΣlt, der mit dem Namen des JAR-Archives identisch sein mu▀. This program only requires a text file "java.run" which includes the name of the main class of the program. This name has to be identically with the name of the JAR-archive.




Mac BeOS OS/2 Unix Java« for other operating systems

D Java« wurde fⁿr viele Hardwareplattformen und Betriebssysteme portiert. Eine Liste aller (offiziellen) Ports ist ebenfalls bei Sun« erhΣltlich und wird regelmΣ▀ig aktualisiert: E Java⌐ was ported for many hardware platforms and operating systems. An actual list of all (official) ports can be also found at Sun's⌐ Java⌐-website:
http://java.sun.com/cgi-bin/java-ports.cgi