http://GameProgrammer.Com

Programming

GP Mailing List
     Thread Index
     Date Index

ATXGPSIG List
     Thread Index
     Date Index

Google
>

Home

Wise2Food



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: a few java questions





Jonathan Smith wrote:
> 
> Well, I might as well start out with the questions. I have to go to bed in a
> sec so, here goes:
> 
> Can the Java compiler produce .exe files or files ready to begin without
> having to have something else start it up?

Their are a lot of java compilers out their. The Sun java compiler does
not and can not generate .exe files. I've read the Symantec Cafe can
generate a .exe file for Java and I'm sure a number of other compilers
can do it too. One article I saw sugests using the following in a .bat
file to make it look pretty much the same.

> 
>                     This solution works for the older JDK's (our application runs on JDK 1.1.8, though it should
>                     work with 1.02 or 1.2.x as well), and Windows 95/98/NT. 
> 
>                     To install our Java application, we have the users copy a directory from a CD to their local
>                     drives. (You can also zip everything up into one zip file for distribution.) The directory has a
>                     bin and a lib subdirectory containing the jre. Also in the directory is a jar file containing all of
>                     the application's class files, and a batch file. 
> 
>                     The user runs the program by double-clicking the batch file from Explorer. You can also
>                     make a shortcut of the batch file, and put it on the desktop or in the Start menu. Either way,
>                     the Java application runs WITHOUT an unneeded DOS frame! Here's how the batch file is
>                     set up to do its magic: 
> 
>                     Contents of the 2-line run.bat: 
> 
>                     @echo off 
> 
>                     @start bin\jrew -classpath lib\classes.zip;.\myJarFile.jar MyMainClass 
> 
>                     When you run the batch file, it briefly launches a DOS frame, which immediately completes
>                     its business and closes itself. The Java application appears shortly afterward in its own
>                     java.awt.Frame. 
> 
>                     Notes: To get the DOS frame to disappear automatically in Windows 95/98, you MUST do
>                     the @echo off part. The DOS frame won't go away if it's displaying any text. Windows NT
>                     doesn't have this problem. 
> 
>                     The "start" command spawns the java application off in its own DOS interpreter. This
>                     allows the batch file to "keep on going", and finish up without waiting for our java
>                     application to terminate. Once the batch file is done, the DOS window is able to close on its
>                     own. 
> 
>                     For those who don't know, jre.exe works essentially the same as java.exe for the purposes
>                     of running your Java program. jrew.exe works just like java.exe, too, but it doesn't spawn a
>                     new DOS window. 
> 
>                     Since the batch file references the jre.exe and classes.zip that we ship along with the app,
>                     there is never any chance of conflicts with any JDK version the user might have already
>                     installed. Also, we don't make the user manually install the JDK or muck about with path
>                     settings. And, this batch file will work no matter where the user decides to install our
>                     application's directory. This is the perfect solution for those of us who have to distribute our
>                     programs to computer illiterates! 
> 
>                     Hope this helps people! 
> 
>                     -Kip Fiebig 
> 
>                     www.kipley.com 
> 
>                     kip.fiebig@tivoli.com


> 
> How can I slow down my java compiler? Everytime I try to compile it comes up
> real fast and goes down even faster without seeing the errors or anything.

That's an interesting problem. I solved it by using an IDE that puts the
output in a window for me. The one I use is free and you can get it at
http://sunsite.auc.dk/jde/


>                                       Peace and may God
>                                        direct your life
>                                         Amen, Jonathan Smith

And may Odin grant you wisdom and Thor grant you the strength to use it.

			Bob P.
=================================================================
The GameProgrammer.Com mailing list is for the open discussion
of any topic related to the art, science, and business of
programming games. This list is especially tolerant of beginners.
We were all beginners once

To SUBSCRIBE or UNSUBSCRIBE please visit:
http://gameprogrammer.com/mailinglist.html