Re: Issue with JxtaSocket example
Mohamed Abdelaziz <[email protected]> Mon, 22 Aug 2005 17:38:10 -0700
| Newsgroups | gmane.comp.java.jxta.user |
|---|---|
| Message-ID | <[email protected]> |
ClassLoaders can be tricky in an IDE. Placing PlatformConfig.master where JxtaSocketExample.class is loaded from, or using the system ClassLoader instead of the application ClassLoader would also address the issue. Mohamed Bruce Rosenthal wrote: > Hmmm, exposing a bit of knowledge lack now. So I would like to get > this set-up in my NetBeans IDE instead of running from command line. > > I tried adding the C:\jxtaApps\PipeService\client\ folder to the > Project Library (both in compile and in run) and I see it there on the > project space, but it still is not running. > > Is there something else I need to do that adds this > PlatformConfig.master to the project classpath within NB IDE? > > Sorry this is now shifting to a Netbeans question for the moment. > > Mohamed Abdelaziz wrote: > >> Bruce Rosenthal wrote: >> >>> You want PlatformConfig.master in the classpath? >>> >> yes. >> >>> Why? It's an XML document. >> >> >> >> Because getResourceInputStream() uses the ClassLoader to open the >> file for reading, and therefore it must exist in the ClassLoader >> search path. >> >> see >> http://java.sun.com/j2se/1.4.2/docs/api/java/lang/ClassLoader.html#getResourceAsStream(java.lang.String) >> >> >> Mohamed >> > >------------------------------------------------------------------------ > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [email protected] >For additional commands, e-mail: [email protected] > > -- http://blogs.sun.com/roller/page/hamada http://weblogs.java.net/blog/hamada