wood burning stoves 2.0*
The moose likes Java in General and the fly likes application entry point Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "application entry point" Watch "application entry point" New topic
Author

application entry point

chen young
Ranch Hand

Joined: Sep 09, 2005
Posts: 188
Hi,

I have a problem to set correct the main entry point in my application

This is the structure that I want to create in the jar:

bin (contain all the classes & the main class -> bin/gui/Main )
properties(properties and xml files)
images(contain all images)
lib(contain all jars)

I run this command in order to create the jar(and its working ok): jar cfvm rcy.jar manifest.txt bin lib properties images

I try few combinations in the manifest file but unfortunately it�s still don�t recognize the main class.

Any suggestions?

Thanks
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18529
    
  40

Jar files don't exactly work that way... First, you can't just place class files anywhere. They have to be placed based on package. Second, you can't just place the manifest in the root. They should be placed in the directory reserved for manifests. And third, I don't think that you are allowed to place jar files in jar files.

Once placed correctly, you can specify the main by a field in the manifest. You can also specify the classpath to use, to locate the other jars, by another field in the manifest.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
 
jQuery in Action, 2nd edition
 
subject: application entry point
 
Similar Threads
Jar Files: Kill me NOW.
Netbeans jars versus Eclipse jars
problem with classpath
help please...
How to eliminiate the background ms-dos window