0

I'm writing a MP3 player in Java. If i will finish I want to pack all .class files in one .jar file. I don't want have player, which starts by console. If i open this one .jar file i want see player window.

I know how to pack it. I must use jar.exe packer with params: cvfm Player.jar MANIFEST.MF ./config/*.class and create MANIEST.MF which content class that has main method.

But the problem is when I want use another Look and Feel, or use existing .jar file. I can put this existing .jar file into my player main dir and compile javac.exe with parameter -cp .;./JarFile.jar, but when I pack all compiled .class files and my existsing JTattooDebug.jar file into one Player.jar file i don't see new Look and Feel i just see default view.

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433

2 Answers2

0

If you are using eclipse.

Right-Click your project

Export -> Runnable Jar File

Then select the destination for your jar, and make sure you have "Extract required libraries into generated JAR" selected. That will give you a runnable jar, complete with auto generated manifest, with all of your needed jars inside.

Jay Smith
  • 471
  • 3
  • 17
0

Solved! I had to add line:

Class-Path: lib/JTattooDebug.jar

in my MANIFEST.MF file, now all works.