Solved

JAR help

Posted on 2004-04-18
9
389 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:DrunkenTigerDDD
ID: 10854550
help
0
 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

751 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