Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

eclipse export jar question

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey everybody,

I just used the export jar feature in eclipse to create a jar file. The jar file should have contained all of the classes and some .wav and .GIF files. When I run the jar file, the class operations operate as intended but without the images and sounds. Any ideas on this?
 
author & internet detective
Posts: 39789
797
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The first question is did you try looking in the jar to see if the .wav files are there. (You can view a jar file in any winzip type program.)

If you are there, there's probably a difference between how the code is opening the sound file that only operates on the file system. Please post this is line of code so we can comment.
 
jeff krystyan
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@ Jeanne,

thanks for replying.

So, for your first question, yes, the all of the files are in the jar file.

below is the code for the wav files.



The string is passed into this portion of a panel where ImageChanger uses the Timer class...




 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It would help if we knew what the value of "current" is when MusicPick is called. I suspect, though, that you should be using Class.getClassLoader().getResource() to access a wav file instead of that way you are doing it.
 
That which doesn't kill us makes us stronger. I think a piece of pie wouldn't kill me. Tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!