View Single Post
  #1 (permalink)  
Old 10-18-2008, 10:57 PM
satbobo satbobo is offline
Member
 
Join Date: Oct 2008
Posts: 4
Rep Power: 0
satbobo is on a distinguished road
Default netbeans: creating a jar including jar libraries
Hi everyone,

I am trying to create a jar of my netbeans project which includes some other jars as libraries.
The problem is that it compiles ok and creates the jar but unfortunately it does not include in the project .jar the libraries needed for the execution.
Therefore when I run the program it complains with a java.lang.NoClassDefFoundError.

I should also say that my program does not have a main method since it is a package that will be loaded dynamically by another program. For this reason Netbeans does not create the /lib folder in the /dist folder, but even if it did I would have liked to avoid to copy the /lib folder over.

Is it any way to tell netbeans to include the libraries within the .jar file?

Anyone can advise on how I can solve this?
Cheers
Reply With Quote