Wiki source code of Programming__WebObjects-Web Applications-Development-Common Pitfalls and Troubleshooting
                  Version 2.1 by Quinton Dolan on 2007/07/12 20:22
              
      Show last authors
| author | version | line-number | content | 
|---|---|---|---|
| 1 | == Debugging Classpath Problems == | ||
| 2 | |||
| 3 | === Chuck Hill === | ||
| 4 | |||
| 5 | I recently found this useful and thought others might too: | ||
| 6 | |||
| 7 | {{code}} | ||
| 8 | |||
| 9 | System.out.println("\nClassPath Follows....\n"); | ||
| 10 | ClassLoader classLoader = ClassLoader.getSystemClassLoader(); | ||
| 11 | URL[] urls = ((URLClassLoader)classLoader).getURLs(); | ||
| 12 | for(int i=0; i<urls.length; i++) { | ||
| 13 | System.out.println(urls[i].toString() + "\n"); | ||
| 14 | } | ||
| 15 | |||
| 16 | {{/code}} | ||
| 17 | |||
| 18 | Add this to public static void main(String argv[[]]) before the call to WOApplication.main(argv, Application.class) and add these imports: | ||
| 19 | |||
| 20 | {{code}} | ||
| 21 | |||
| 22 | import java.io.*; | ||
| 23 | import java.net.*; | ||
| 24 | |||
| 25 | {{/code}} | ||
| 26 | |||
| 27 | Category:WebObjects |