View Full Version : Making java bytecode easier to execute

10-27-2002, 05:17 AM
I am wondering if there is an alternative to distributing Java programs with the JVM.

For instance, I am wondering if anyone has seen a Java compiler that produces machine code rather than bytecode? I've heard of them, but never ever seen them :(
(Yes, I know I lose the 'compile once, run everywhere' property but I'm willing to make that sacrifice :)

Alternatively, what is the easiest way to make the Java class file seem 'executable'
(but using the JVM). My Current approach is to use a bat file (or shell script). With the bat file I simply associate my .class files with it and I can then run it by double-clicking the class file containing my main method. However, some people find this a bit confusing since they are not used to running .class files. Is there a better way of achieving this?

10-27-2002, 03:01 PM
If you are supporting Windows, look into converting the program into a .exe file. I can't remember the process exactly(and I'm not at my PC), but a search in java forums(like SUN or another java forum) should point you in the direction.

10-31-2002, 06:41 AM

Thanks for your help. I've had a look on the Sun forum but the best I can seem to come up with is a shareware proggy that does this. However, I was looking for something a bit more permanent (and a bit more free :D ) .... so any other ideas would certainly be appreciated.

Has anyone heard/seen a compiler that compiles java code to machine code?

Whenever the java/c++ speed debate comes up, someone ALWAYS mentions the existence of a java compiler to compile directly to machine code which is supposedly narrowing the speed gap ... I, however, have never seen anything like that. So I'm wondering if it's a myth (like dry land) or does it really exist?

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum