wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Running an application 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 » Beginning Java
Bookmark "Running an application" Watch "Running an application" New topic
Author

Running an application

Ajay Joseph
Greenhorn

Joined: Nov 04, 2004
Posts: 21
how we run a java application by double clicking an icon or file. i ask this to run a project with first section as login name and password. i want to create this page as frame or application .


awaiting Reply

Ajay Joseph
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

You have a number of options. You can write batch file which incudes the "java -jar jarFile.jar" command. You could write a piece of naive code to do the same and create a .exe. Or you can tweak the OS to do something simmilar (associate .jar files wit ha more general batch file).


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Ben Wood
Ranch Hand

Joined: Aug 14, 2001
Posts: 342
If you are putting the application inside a jar file you can make the jar file double clickable to run the application

Creating an executable JAR file

Create a text file to add to the manifest which declares the Main-Class attribute for the application, making sure to add a carriage-return at the end of the line. Adding this will cause the application to look for a main() in Foo.class:



Create the archive and include the manifest addition with a command like this which archives two class files into an executable Foo.jar:



SCJP 1.4, www.gsi3d.org.uk
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Running an application
 
Similar Threads
View cannot be restored exception
Deploy JBoss Application to WAS
Not able run mysql based jdbc program
J2EE and EJB on SDK
J2EE begineer