Results 1 to 8 of 8

Thread: How to launch java application

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2005
    Posts
    70

    Question How to launch java application

    I have a java file(hello.java). Then i used javac hello.java to compile it to bytecode. Everytime i must use java hello to run this application. I want to know how can i run it like other windows application by double click it.

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: How to launch java application

    1) You can create a .bat file that contains the command to launch it.

    2) You can create a small .exe that launches it. (I think there are tools that do that.)

    3) You can pack it into an executable JAR. With the right file associations, you can just double-click it.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: How to launch java application

    You can use JBuilder (I do) to compile to native languages (windows, dos, unix, mac)
    or you can use "NetBeans" it free from sun website, it compiles to exe if you download the windows version
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  4. #4
    Frenzied Member System_Error's Avatar
    Join Date
    Apr 2004
    Posts
    1,111

    Re: How to launch java application

    Executable jar, no contest. run the command and then make sure you have the mainfest set up correctly.

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Nov 2005
    Posts
    70

    Question Re: How to launch java application

    How can i know whether the computer have Java Virtual Machine installed or not? It is Java Virtual Machine installed when we installed J2SDK? If i only want to installed Java Virtual Machine to run *.class class, how to install?

  6. #6
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: How to launch java application

    Install the JRE to run .class files it's also associated with the JDK
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Nov 2005
    Posts
    70

    Question Re: How to launch java application

    What is JRE? So it means that after i installed JRE, i can use command java. What can i do after i installed JRE?

  8. #8
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: How to launch java application

    JRE is the Java Runtime Environment - everything an end user needs to run Java programs.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

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



Click Here to Expand Forum to Full Width