Results 1 to 7 of 7

Thread: A Java Question

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    chris_uk_83's Avatar Physicist
    Join Date
    Feb 2007
    Location
    Lancaster, England
    Posts
    818

    Default A Java Question

    I've been writing a Java program or two recently and I'd quite like to know how I can turn them into proper executable programs, rather than having to run them through the IDE.

    If anyone can point me in the direction of any further reading I'd be quite appreciateive.

    Also, I'm eventually after making my program executable on a PDA running Windows Mobile. Will the process of making it executable be any different, and will it work at all?

    Cheers

    If I've helped you, rep me. I live for rep.

  2. #2
    Simetrical's Avatar Former Chief Technician
    Patrician

    Join Date
    Nov 2004
    Location
    θ = π/0.6293, φ = π/1.293, ρ = 6,360 km
    Posts
    20,154

    Default Re: A Java Question

    I don't work with Java, but it isn't really meant to be compiled to EXE. Google turned up this, which doesn't sound terribly promising for you. In general, if you want to write EXEs you should use a language whose primary implementations are compilers, like C++.
    MediaWiki developer, TWC Chief Technician
    NetHack player (nao info)


    Risen from Prey

  3. #3
    Erik's Avatar Dux Limitis
    Join Date
    Aug 2004
    Location
    Amsterdam
    Posts
    15,653

    Default Re: A Java Question

    Simetrical is right, you can't (to my knowledge) turn a Java program into a stand-alone executable.

    You must convert your sourcecode into java bytecode, using the java compiler ("javac").
    Then you'll need a java bytecode interpreter (usually called a "java virtual machine") to run the java bytecode.

    The big advantage is that java bytecode programs can run (unaltered) on any computer with a java bytecode interpreter, and that includes a wide range of different platforms, including:
    -PC's (both Windows and Lunux)
    -Unix workstations.
    -Mac's
    -PDA's
    -Most mobile phones.

    Stand-alone programs usually only work on one platform.

    Since you want your program to run on your PDA, it was probably a good idea to make it in java.



  4. #4
    chris_uk_83's Avatar Physicist
    Join Date
    Feb 2007
    Location
    Lancaster, England
    Posts
    818

    Default Re: A Java Question

    Thanks guys. So all I really need is my jar file? It ought to work on my PDA simply by copying it across and running it?

    I've yet to buy the PDA so I can't actually test this yet

    If I've helped you, rep me. I live for rep.

  5. #5
    Erik's Avatar Dux Limitis
    Join Date
    Aug 2004
    Location
    Amsterdam
    Posts
    15,653

    Default Re: A Java Question

    Quote Originally Posted by chris_uk_83 View Post
    So all I really need is my jar file? It ought to work on my PDA simply by copying it across and running it?
    Yes, just copying the .jar files should work.



  6. #6
    Simetrical's Avatar Former Chief Technician
    Patrician

    Join Date
    Nov 2004
    Location
    θ = π/0.6293, φ = π/1.293, ρ = 6,360 km
    Posts
    20,154

    Default Re: A Java Question

    Assuming it has the JVM installed.
    MediaWiki developer, TWC Chief Technician
    NetHack player (nao info)


    Risen from Prey

  7. #7
    chris_uk_83's Avatar Physicist
    Join Date
    Feb 2007
    Location
    Lancaster, England
    Posts
    818

    Default Re: A Java Question

    Cheers guys, it really was that simple! Got it working fine now. All I have to do now is fix the resolution to fit the mini screen!

    On a side note, does anyone know if there's a pluggable look and feel for windows mobile available?

    If I've helped you, rep me. I live for rep.

Posting Permissions

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