JAR help

Hey i am trying to make my program into a jar file in Netbeans. But i am having problems and i  am not sure where.
I think i want it to be a stand alone jar file, though im not 100% on what that means.
But not be stuck on a windows machine, i need it to work for Mac also.


my Manifest is:


Manifest-Version: 1.0
Main-Class: SP1
Created-By: NetBeans IDE
Specified-By: Kenjar.jarContent

And all the files i want to include, i have a screen shot of-
http://www.geocities.com/drunkentiger765/JavaMediaPlayer/temp1.JPG

Thanks for you help and quickness like always
DrunkenTigerDDDAsked:
Who is Participating?
 
91mustangConnect With a Mentor Commented:
>>is javazoom/jl/player/advanced/PlaybackListener in a jar file already?
if that is the case, it will not work.. you can not have a jar inside another jar. you have to use the classpath attribute in the manifest to point to where the 3rd party jar is. here are a few links:

http://forum.java.sun.com/thread.jsp?forum=22&thread=480118&tstart=0&trange=15

http://experts-exchange.com/Programming/Programming_Languages/Java/Q_20852941.html

The last post in both threads will be the important part. your best option is to do Jimmack's suggestion, where he deploys in a zip file, so then he knows the external jar file is in the correct location every time
0
 
DrunkenTigerDDDAuthor Commented:
i get this problem when i try

java.lang.NoClassDefFoundError: javazoom/jl/player/advanced/PlaybackListener
Exception in thread "main" 
0
 
91mustangCommented:
make sure you include the entire folder structure: javazoom/jl/player/advanced/PlaybackListener
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
DrunkenTigerDDDAuthor Commented:
well i add the jar file, i have also tryed adding the directory with all the classes in it, neither are working
0
 
DrunkenTigerDDDAuthor Commented:
help
0
 
91mustangCommented:
is javazoom/jl/player/advanced/PlaybackListener in a jar file already?
0
 
Mayank SAssociate Director - Product EngineeringCommented:
0
 
mmuruganandamCommented:
The problem is

In your Jar, the PlaybackListener is having an extra folder classes/javazoom/jl/player/advanced/PlaybackListener

It should be

javazoom/jl/player/advanced/PlaybackListener

Then your program will work.

Jar your files from javazoom package.  Or move the javazoom package to the root.  It shouldnt be with in classes folder in the jar file.

Hope this helps.


Regards,
Muruga
0
 
91mustangCommented:
thanks :-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.