Meaningless Drivel is fun!*
The moose likes Java in General and the fly likes Classpath inside Jar 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 » Java in General
Bookmark "Classpath inside Jar" Watch "Classpath inside Jar" New topic

Classpath inside Jar

Stephan van Hulst

Joined: Sep 20, 2010
Posts: 3600

Hey guys,

I'm putting some stuff in an executable Jar, and I'm wondering, do the classes/packages always need to be found at the top level?

For instance, if I have a package named, does the org folder need to be at the top level, or can I put all my packages in a folder named bin, and set the classpath to this folder?

Ram Narayan.M
Ranch Hand

Joined: Jul 11, 2010
Posts: 247

Since packages has been stuffed into the JAR file, only jar file name can be set in the classpath... And org folder should be at the top level, Then only JVM can make search into the jar and visits the folder correctly

SCJP 6 [SCJP - Old is Gold]
Stephan van Hulst

Joined: Sep 20, 2010
Posts: 3600

Thanks man. Bit of a pity.
Consider Paul's rocket mass heater.
subject: Classpath inside Jar
Similar Threads
Eclipse Workspace, can you collapse a package directory structure?
How to access an applet from a folder inside a jar file -- Urgent
Can't find ..\lib\ext\ packages
Jars & Zips & Classpath