File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Executable" Watch "Executable" New topic


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

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

    -Shriram Shivakumar
    I agree. Here's the link:
    subject: Executable
    It's not a secret anymore!