aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes JAR utility Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "JAR utility" Watch "JAR utility" New topic
Author

JAR utility

Ahji Thameur
Greenhorn

Joined: Jan 31, 2008
Posts: 3
Hi guys,

This my sound stupid, but I'm having problems compressing my project.

This is the structure of my project:
package suncertify.client
package suncertify.db
package suncertify.server

The problem is that I have to put into my jar file this directory structure:
src/suncertify/...
otherwise the code doesn't work.

I have tryed everything: using a manifest file, using -C and -e options of the jar command, creating a jar within another jar.
Even when I write in my manifest:

Class-Path: src
Main-class: suncertify.client.RunApp

I still get : Exception in thread "main" NoClassDefFoundError : suncertify/client/RunApp

If any of you have had this exact problem, please help, I have spent about 15 hours on the command line trying to solve this.
Herman Schelti
Ranch Hand

Joined: Jul 17, 2006
Posts: 387
hi,



Is the RunApp really in your jar file?
Can you post the package declaration in RunApp?

Herman
Ahji Thameur
Greenhorn

Joined: Jan 31, 2008
Posts: 3
yes, RunApp is definelty in my suncertify.client package
This is the package statement
package suncertify.client;

I'm using netbeans. Not even the jar created by this ide doesn't work.

This package structure is a must in my assignment.
If I don't have all the packages in a src folder, there's no way I can get the application to work.

I really don't know how to solve this.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: JAR utility