Solved

JAR help

Posted on 2004-04-18
9
384 Views
Last Modified: 2010-03-31
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
0
Comment
Question by:DrunkenTigerDDD
9 Comments
 

Author Comment

by:DrunkenTigerDDD
ID: 10854332
i get this problem when i try

java.lang.NoClassDefFoundError: javazoom/jl/player/advanced/PlaybackListener
Exception in thread "main" 
0
 
LVL 4

Expert Comment

by:91mustang
ID: 10854429
make sure you include the entire folder structure: javazoom/jl/player/advanced/PlaybackListener
0
 

Author Comment

by:DrunkenTigerDDD
ID: 10854454
well i add the jar file, i have also tryed adding the directory with all the classes in it, neither are working
0
 

Author Comment

by:DrunkenTigerDDD
ID: 10854550
help
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 4

Expert Comment

by:91mustang
ID: 10854579
is javazoom/jl/player/advanced/PlaybackListener in a jar file already?
0
 
LVL 4

Accepted Solution

by:
91mustang earned 250 total points
ID: 10854610
>>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
 
LVL 30

Expert Comment

by:Mayank S
ID: 10856846
0
 
LVL 9

Expert Comment

by:mmuruganandam
ID: 10857371
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
 
LVL 4

Expert Comment

by:91mustang
ID: 10942763
thanks :-)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

947 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now