Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Eclipse jar file problem

Thread Tools

Eclipse jar file problem

MstrOfPppts MstrOfPppts is offline
Junior Member
Join Date: Oct 2008
Posts: 1

I have this problem when creating a .jar file of my project. In Eclipse I have my project working and when exporting it as a .jar file, sounds won't work.

In eclipse this is the folder structure:
----(default package)

This is how I call my sound file in

String filePath = System.getProperty("user.dir")+"\\src\\sound\\";

It works perfectly in eclipse, but after I export this into jar, the sound doesn't work. I assume I have to change the path somehow, but don't know how.

If I copy source files onto let's say D:\ and compile with javac, I have to delete the src\\ part from the filePath. And the java Main works great. But even here by creating the .jar file with jar cf ... sound doesn't work.

All I have noticed is that not jar command nor eclipses' export don't create the META-INF/INDEX.LIST file which I saw in a working .jar file. I tried adding it manually but with no success ...

Any suggestions would be great!

Best regards

Last edited by MstrOfPppts; 10-21-2008 at 08:26 PM..
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
jar file from Eclipse at the root of the jar file rather than nestedin directories Java 0 03-27-2008 06:26 PM
java -cp a.jar -jar b.jar => Works on Windows, not on Debian cyberco Java 4 02-14-2006 06:27 AM
create an exectuable jar file whose classes reference another jar in Eclipse puzzlecracker Java 2 12-20-2005 03:33 AM
jaas.jar, jta.jar jdbc-stdext.jar missing from jdk1.5 RPM muttley Java 0 10-20-2005 02:40 PM
Differences of xercesImpl.jar, xercesImpl-J.jar, dom3-xercesImpl.jar ? Arnold Peters Java 0 01-05-2005 10:59 PM