I am trying to figure out if my Java is misbehaving or not.
I have cleaned and built my Java project in NetBeans and then tried to run the program on the command line with the following command:
java -jar ProjectName.jar
I get the following error:
The library x.dll could not be loaded by Windows. Make sure that the
library is in your Path environment variable. Exception in thread
“main” java.lang.ExceptionInInitializerError.
Does this mean that for every project with library files in the dist folder, I need to include it in the path environment variable? This sounds awfully troublesome and I would have thought that Java would be smart enough to look inside the lib folder for these library files. Or do I need to configure something else in the IDE to do this?
1 Answer