wood burning stoves*
The moose likes Swing / AWT / SWT 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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "running an application" Watch "running an application" New topic
Author

running an application

Giuseppa Cefalu
Ranch Hand

Joined: Jul 15, 2011
Posts: 121
What do I have to do so that the users can ran an application witout having to use the compiler. is this what har files are for? How can I make so that the users run the application with the click of a button without seen the code?
Minh Nam
Ranch Hand

Joined: Sep 10, 2011
Posts: 57
Giuseppa Cefalu wrote:What do I have to do so that the users can ran an application witout having to use the compiler. is this what har files are for? How can I make so that the users run the application with the click of a button without seen the code?


By putting your compiled classes into a Java Archive (JAR) file. You can think a .jar file is similar to .exe one.


Advanced java topics
Giuseppa Cefalu
Ranch Hand

Joined: Jul 15, 2011
Posts: 121
Thank you! In order to run the jar file, could one put the jar in a folder on the VM that will be runnable by everyone, perhaps /usr/local/bin.
Giuseppa Cefalu
Ranch Hand

Joined: Jul 15, 2011
Posts: 121
I found this great tutorial on how to create, distribute and executing a JAR file. A jar file allows for the running of the application outside the IDE. Does this means that once in the jar any user without a compiler in his/her computer can run the program?
Minh Nam
Ranch Hand

Joined: Sep 10, 2011
Posts: 57
Giuseppa Cefalu wrote:Thank you! In order to run the jar file, could one put the jar in a folder on the VM that will be runnable by everyone, perhaps /usr/local/bin.

Can be anywhere.
Minh Nam
Ranch Hand

Joined: Sep 10, 2011
Posts: 57
Giuseppa Cefalu wrote:I found this great tutorial on how to create, distribute and executing a JAR file. A jar file allows for the running of the application outside the IDE. Does this means that once in the jar any user without a compiler in his/her computer can run the program?

Yes, as long as the user has Java Runtime installed and .jar file is associated with java launcher.
Giuseppa Cefalu
Ranch Hand

Joined: Jul 15, 2011
Posts: 121
Thanks a lot!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: running an application
 
Similar Threads
mapping roles to users in declarative security
what's LDAP server
Design issue: Viewing files in Web application and hide it from user based on securit
how to restrict the user in ejb?
How to run WebStart app with -Xrunhprof