• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Bear Bibeault
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Jj Roberts

creation of exe file

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please help me in this
can we get an .exe file from an java application?
instead of typing java filename to get the output
avinash ramineni
 
Ranch Hand
Posts: 1871
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Creating an exe from a java application will make the Java Application loose its platform independence. However this can be done in one of the Integrated Development Environment.
------------------
Regds.
Rahul P. Mahindrakar
 
avinash ramineni
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Rahul Mahindrakar:
Hi,
Creating an exe from a java application will make the Java Application loose its platform independence. However this can be done in one of the Integrated Development Environment.

hello mr.rahul
can u tell me how it can be done in an integrated development environment.hope you can answer my second question about Object Streams
u can contact me at avinash_ramineni@hotmail.com
 
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can make a java application work as if it sefl-executable by adding all necessary files to a jar file. After doing that modify the Manifest.mf file in the jar by adding the line

Main-Class: MainClassName

Now you can simply double click on the jar file, and it will run the program.
[ March 31, 2008: Message edited by: Noah Carroll ]
 
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe you are looking for a program like JtoEXE.
Hope this helps
 
avinash ramineni
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks noah and carl
i got it. mr.noah can u be more precise with your answer .thanks once again
avinash
 
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can also create a shortcut and on the command line of the shortcut you can put in your java command.
i.e. I used javaw.exe to run a class file that I had. I copied javaw.exe to the working directory of my class file and made the command line look like this:
c:\dev\work\javaw.exe
Then I save the shortcut, went back into properties and added the class file name at the end of the command line to look like this:
c:\dev\work\javaw.exe classfile
then I saved it. It worked fine.
ryan
 
Noah Carroll
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using the command prompt(or your java IDE if it is capable) you should place all of your necessary class files into a jar file(java archive). After you have made the jar, you should update it with a new manifest.mf file. I did it by extracting the manifest.mf, modifying it by adding the line

Main-Class: mainclassname

Then when using windows(possibly other platforms, im not familiar with non-windows) you can simply double click the file icon, and it will run your program.
------------------
I hope its helps, feel free to email me noahcarroll@juno.com
 
It's just a flesh wound! Or a tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic