Solved

JAR help

Posted on 2004-04-18
9
392 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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 

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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

627 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