Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-03-2007, 10:48 AM
Member
 
Join Date: Mar 2007
Posts: 41
peiceonly is on a distinguished road
Executing a jar file
Hi all
How can I execute a jar file ?
how can I make such file ?
Will it be executed as an exe file in windows ?
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-03-2007, 12:29 PM
Senior Member
 
Join Date: Mar 2007
Posts: 136
goldhouse is on a distinguished road
Sun defines the jar files as below
JAR file is a file format based on the popular ZIP file format and is used for aggregating many files into one. A JAR file is essentially a zip file that contains an optional META-INF directory. A JAR file can be created by the command-line jar tool, or by using the java.util.jar API in the Java platform. There is no restriction on the name of a JAR file, it can be any legal file name on a particular platform.

In many cases, JAR files are not just simple archives of java classes files and/or resources. They are used as building blocks for applications and extensions. The META-INF directory, if it exists, is used to store package and extension configuration data, including security, versioning, extension and services.

The main attributes for the Manifest file include Main-Class : where you can specify the entry class for the jar file.
But still this is not like exe because it is just the zipped classes and it is platform independent.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 04-06-2007, 03:32 PM
Senior Member
 
Join Date: Dec 2006
Posts: 748
levent is on a distinguished road
Quote:
The main attributes for the Manifest file include Main-Class : where you can specify the entry class for the jar file.
But still this is not like exe because it is just the zipped classes and it is platform independent.
Normally, when you installed a JRE on a machine, it adds a filetype "jar" associated with java.exe. With that association, when you double click on a jar file, it is run by JRE. (If Main-Class attribute set correctly as goldhouse stated.)
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply

« - | Date math »

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with executing mcal New To Java 2 02-09-2008 02:51 PM
executing the java file TheBayWatchMan New To Java 4 01-12-2008 10:31 AM
Problem with executing .jar files hiranya NetBeans 2 10-02-2007 08:24 PM
Executing Batch zcoarens New To Java 0 08-14-2007 10:49 AM
Problem while executing programs bks504 New To Java 10 08-02-2007 02:32 PM


All times are GMT +3. The time now is 10:56 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org