Link to home
Start Free TrialLog in
Avatar of Marco Gasi
Marco GasiFlag for Spain

asked on

Netbeans and org.apache.commons.lang3 issue

Hi everybody.
I'm new to Java and I'm playing with a small project, just to start. Using Netbeans IDE, I wanted to import org.apache.commons.lang3.StringUtils, so I followed following steps:

1) right click on Libraries node in Projects panel
2) choosen Add JAR/Folder
3) added commons-lang3-3.5.jar file downloaded from Apache site
4) run the project (everything's fine)
5) Clean & build to create my small jar file

Then I used jSmooth to convert the jar file to a Windows executable and after some test I activated the debug option and there I saw that  I had this error:
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils

Open in new window


Netbeans doesn't raise any error at all but conversion makes the exe raise that error and the code after the line where StringUtils is used is not executed...

Any idea?
Thank you for any help :)
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Marco Gasi

ASKER

Ah, that's an ide :)
I have no particular reason to make an exe (jar file executes perfectly). Just to explore... After all Netbeans itself comes as an exe so I was curious how a Java program could be converted in a Windows exe file. Going to check your idea.
Just added the commons-lang3-3.5.jar to the the classpath list in Application section of jSmooth and everything went fine. Thank you.