Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Executable

 
Paul Keohan
Ranch Hand
Posts: 411
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic