Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Aug 2002
    Location
    Cape Town, South Africa
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Making java bytecode easier to execute

    Hi
    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?

  • #2
    Regular Coder
    Join Date
    Sep 2002
    Location
    Surrey, UK
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #3
    New Coder
    Join Date
    Aug 2002
    Location
    Cape Town, South Africa
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi

    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 ) .... 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?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •