Search code examples
swingjavanimbus

how to choose a jre on runtime?


i have a Swing app and i want to run it with Nimbus look'n'feel. I have the last update for the JRE and I know how to setup my app to use Nimbus look'n'feel using UIManager class, but I want my app to choose the right JRE on runtime to use Nimbus. How to do that?

I am using Netbeans.


Solution

  • You can use a native launcher like Launch4J which allows you to explicitly "Work with a bundled JRE or search for newest Sun or IBM JRE / JDK in given version range."

    Also, take a look at this question.