• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Running an application

 
Ajay Joseph
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
Ben Wood
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic