Netbeans (Java): 3rd library works, but how can I compile it into a jar?

I use 3rd libraries (substance, trident) and I added them as libraries (I added .jar) to my project in Netbeans. This also works, but if I use the built-in jar outside the project directory, it does not work as it should (the selected user interface does not appear), I get an error message:

java.lang.ClassNotFoundException: org.pushingpixels.substance.api.skin.SubstanceOfficeBlue2007LookAndFeel

I installed this UI / LookAndFeel as in my code:

UIManager.setLookAndFeel("org.pushingpixels.substance.api.skin.SubstanceOfficeBlue2007LookAndFeel");

How can I do this work / run?

+3
source share
1 answer

You have 2 options:

  • CLASSPATH.
  • .

1 , , , "" ​​ ; . , jar .

2 , maven fatjar Eclipse (, , NB).

, .

+3

Source: https://habr.com/ru/post/1780911/


All Articles