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. In this case, you need two main() methods. The first one builds a classloader and then uses this classloader to call the second main().

Here is an example which selects the correct SWT native JAR for your platform, adds all your application’s JARs and then invokes the real main() method: http://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:


The Classpath:
* Dynamic Classpath

Table Of Contents
8 Arrays
10 Maps
11 Strings
25 JAXB
29 Enums
32 Audio
41 Scanner
63 Logging
75 Lists
78 Sets
84 The Classpath
89 JAX-WS
96 XJC
98 Process
106 Modules
114 Applets
122 JNDI
139 JavaBean
141 Literals
144 Packages
150 JMX
153 JShell
159 Sockets
167 Enum Map
175 Hashtable
177 SortedMap