This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes Executable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Executable" Watch "Executable" New topic
Author

Executable

Paul Keohan
Ranch Hand

Joined: Mar 15, 2000
Posts: 411
I've no doubt that a form of this question has been asked many times but I've been unable to find a satisfactory answer. How do I make an exe file from my class file so that I can run it from a windows shortcut?
Thanks
Paul
Shriram Shivakumar
Ranch Hand

Joined: Jun 20, 2000
Posts: 42
Well, there are more that one way to do this.
  • Creating a script/batch file:

  • You can create a batch file, say <applicationname>.bat . In this batch file you can, if needed, check and/or set up the environvment variables, and invoke your .class file using standard java.exe or jre.exe.
  • Using 3rd party software:

  • If you are using Visual Caf´┐Ż, you can create a .exe file by selecting from Project Option menu. Use SmartJ Java launcher: http://www.revusky.com/hacks/smartj-faq.html

    [ February 11, 2002: Message edited by: Shriram Shivakumar ]

    -Shriram Shivakumar
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Executable
     
    Similar Threads
    Passing Parameters
    jsp page appears in xml tree format. how can i fix this?
    Transferring files over the network: is this possible?
    ActionMessages not found under 'messages'
    Launching PDF files