University of Lausanne, Switzerland - Université de Lausanne, Suisse |
RunJava |
The RunJava Suite by Eric Keller (Eric.Keller@imm.unil.ch)RunJava.exe
CRJavaApplic.exe These Windows programs are here for those of us who hate to type and love to double-click, even when running Java applications in a bare bones Windows environment. These programs create short batch files that run the Java compiler (javac.exe) and/or the Java interpreter (java.exe), and/or the appletviewer for Java applications and applets you have written. To convert a Java application class into a double-clickable executable, take a copy of RunJava.exe, name it what you want, and run it. The first time, it asks you for the name of the application, subsequently you can simply double-click to run your application. This in effect makes double-clickable applications out of your Java applications. RunJava.exe requires that you have a Java virtual machine called java.exe installed on your computer (check your Windows folder). Generally that means that you have the Java Runtime Environment (JRE) installed somewhere on your machine. If you don't, you can download one via http://java.sun.com/products/jdk/1.2/jre/index.html. The rest of the programs suppose that in addition, you have an operational Java Development environment on your Windows 95 or 98 machine, and that your paths and classpaths are set up correctly. If this is not the case, you should first download the current Java development kit from http://java.sun.com/products/jdk/ (follow the indications for the current Windows SDK). Once everything is set up correctly, you can run these programs from anywhere on your disk. |
L'ensemble RunJava par Eric Keller
|
What these programs do in detail
CRJavaApplic.exe compiles and runs a Java application
(extension *.java)
RunJava.exe runs a set Java application without asking
the user for a file name more than once (extension *.class) java TestApplic
Or: supposing you have a Java applet called
"TestApplet.java", double-clicking CRJavaApplet.exe
is equivalent to creating and running a batch file containing appletviewer TestApplet.html
RunJavaApplic.exe and RunJavaApplet.exe leave out the
first line for compilation and just run java or appletviewer.
RunJava.exe asks only once, stores the name in a file called
"AppName.txt", and henceforth executes the application
without asking the user. You can rename RunJava.exe what you
want, e.g., RunMyVeryOwnAppl.exe. Simply delete the file
"AppName.txt" if you want to have the program run another
Java application. |
En détail
CRJavaApplic.exe compile et exécute une application
Java (extension *.java) RunJava.exe exécute une application Java sans demander le nom du fichier plus d'une fois (extension *.class) Spécifiquement: en supposant que vous ayez une application Java appelée "TestApplic.java", un double-clic sur CRJavaApplic.exe créera et exécutera un fichier batch contenant java TestApplic Ou: en supposant que vous ayez une applet appelée "TestApplet.java", un double-clic sur CRJavaApplet.exe créera et exécutera un fichier batch contenant appletviewer TestApplet.html RunJavaApplic.exe et RunJavaApplet.exe ôtent la première ligne de compilation, et ne font qu'exécuter java ou appletviewer. Tous ces logiciels, sauf pour RunJava.exe, demandent un nom de fichier à l'utilisateur. RunJava.exe ne demande le nom qu'une seule fois, le stocke dans un fichier appelé "AppName.txt", et exécute l'application dorénavant sans plus demander le nom à l'utilisateur. Vous pouvez le renommer ce que vous souhaitez, p.ex., LanceMaPropreAppJava.exe. Si vous souhaitez que le logiciel exécute une autre application, effacez simplement le fichier "AppName.txt". Après utilisation, les fichiers batch sont effacés. Pour rendre la vie encore plus simple aux double-cliqueurs, le logiciel crée un fichier texte appelé "LastClassPath.txt" dont la fonction est de stocker le dernier dossier à partir duquel vous avez lancé un programme Java. |
FAQ 1: Why do you create and run a batch file? Why not launch the process directly from the *.exe file?At least in my experience, a spawned process exits as soon as it is over. When you're running Java application that writes to the DOS monitor, the monitor window closes as soon as the Java application is done. This means that you can't see what the application wrote in the window. Running a batch file gets around this problem. |
FAQ 1: Pourquoi créer et exécuter un fichier batch? Pourquoi pas lancer le processus directement à partir du logiciel *.exe?Dans mon expérience, un processus de ce type quitte aussitôt qu'il a terminé son travail. Quand on fait exécuter des applications Java qui écrivent sur la fenêtre du moniteur DOS, la fenêtre du moniteur ferme aussitôt que l'application Java a terminé. Par conséquent, vous ne voyez pas ce que l'application a écrit dans la fenêtre. Ce problème est contourné en lançant un fichier batch. |
LegaleseThese programs are free of charge, but they are Copyright © 2000 University of Lausanne, Switzerland. No further documentation exists (or seems needed). No guarantees or warranties are made on these products. If you reside in an area which does not permit the use or distribution of free products without guarantee or warranty, you are invited not to download this product. This suite of programs has only been tested on a Windows 98 system. Enjoy and type less. |
Matières légalesCes logiciels sont gratuits, mais ils sont Copyright © 2000, Université de Lausanne, Suisse. Aucune autre documentation existe (ou semble nécessaire). Aucune garantie n'est faite pour ces produits. Si vous résidez dans une législation qui exclut l'utilisation ou la distribution de produits gratuits sans garantie, vous êtes invité à ne pas charger ce produit. L'ensemble de ces logiciels n'a été testé que sur un système Windows 98. Pour votre appréciation et pour moins taper. |