Dynamic Classpath

suggest change

Sometimes, just adding all the JARs from a folder isn’t enough, for example when you have native code and need to select a subset of JARs. One approach uses two main() methods. The first builds a class loader and then uses that class loader to call the second main().

Here is an example which selects the correct SWT native JAR for your platform, adds all of your application’s JARs, and then invokes the real main() method: https://stackoverflow.com/questions/2706222/create-cross-platform-java-swt-application/3204032#3204032

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents