Hi, Thanks to take care of this Stefan. As I understand your problem, you use directly Sextante source tree in your project, not bundled jar files. In the Sextante source tree, images are in their own directory, not in src/ directory. Probably the reason why they are not found by the classloader. I think you have - either to use Sextante compiled jar files (or do you intend to modify core Sextante classes ?) - or to add images directory in the classpath (not sure it is enough) - or to move Sextante images directory inside the src/ tree
Michaël > Hi all, > > I finally tracked the problem down that, as I just found out now, exists > since Sextante 0.3. > > I wrote that I am trying to use a Sextante Algorithm within an OpenJUMP > plugin class. Here, somewhere on the way, when the output is to be > created, I got a null pointer for SextanteGUI.getOutputFactory() in the > IDE. However, I did not get this null pointer when I use the same > algorithm/OJ Plugin in OpenJUMP PLUS when Sextante is loaded. > > So what happens is that Sextante needs to be initialized using > Sextante.initialze() and SextanteGUI.initialize(), with the latter > containing the information on the OutputFactory. The initialisation for > SextanteGUI fails in the IDE, because during class initialization we find: > > public final static ImageIcon SEXTANTE_ICON = new ImageIcon( > > SextanteGUI.class.getClassLoader().getResource( > "images/module2.png")); > > and this image file is nowhere existing in my IDE (as Eclipse may use > different class loader; which Victor suggested in 2009 [1]). > > Hence, not the solution, but the workaround is to load Sextante with > OpenJUMP as jar files (one for Sextante and one for Sextante GUI), since > they contain the said image. > > So, my suggestion would be to remove that line or do some try/catch > statement. > > On my way to tracking this down, I wrote a OJSextanteApiInitialiser > class that also helps to see if Sextante was already initialised > earlier. I will upload this to OJs SVN repository with the copy of the > bindings. I also made a getter re-addition to the both OpenJUMPXXLayer > classes, since the interface classes lost with the newer Sextante > version the access to the filename/path (which I need to delete > intermediate processing results). > > I will do more testing in the next days, so hopefully we have Sextante > 1.0 and OJ synchronized soonish. The changes weren't as big as I was > thinking - but maybe I missed things??? > > cheers, > stefan > > [1] > http://www.mail-archive.com/sextante-users@lists.forge.osor.eu/msg00109.html > > Am 27.10.12 18:17, schrieb Stefan Steiniger: >> so.. the error for the vector data (postprocess()) and the raster data >> (.create()) are both due to SextanteGUI.getOutputFactory() returning null. >> Now the question is "why?" ... >> >> And even more so, why does it work in my compiled OJ PLUS but not from >> within the IDE... >> >> I guess I will ask the Sextante list directly. >> >> cheers, >> stefan >> >> ------------------------------------------------------------------------------ >> WINDOWS 8 is here. >> Millions of people. Your app in 30 days. >> Visit The Windows 8 Center at Sourceforge for all your go to resources. >> http://windows8center.sourceforge.net/ >> join-generation-app-and-make-money-coding-fast/ >> _______________________________________________ >> Jump-pilot-devel mailing list >> Jump-pilot-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >> > ------------------------------------------------------------------------------ > WINDOWS 8 is here. > Millions of people. Your app in 30 days. > Visit The Windows 8 Center at Sourceforge for all your go to resources. > http://windows8center.sourceforge.net/ > join-generation-app-and-make-money-coding-fast/ > _______________________________________________ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > > ------------------------------------------------------------------------------ WINDOWS 8 is here. Millions of people. Your app in 30 days. Visit The Windows 8 Center at Sourceforge for all your go to resources. http://windows8center.sourceforge.net/ join-generation-app-and-make-money-coding-fast/ _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel