tags:

views:

59

answers:

2

Hello ! I'm trying to follow this tutorial to try and begin to understand the Visual Library. I followed it step by step, checked everything... and everytime I try to run the thing, I get this :

Exception in thread "main" java.lang.NoClassDefFoundError: org/openide/util/LookupListener at vislibdemo.GraphSceneImpl.attachNodeWidget(GraphSceneImpl.java:49) at vislibdemo.GraphSceneImpl.attachNodeWidget(GraphSceneImpl.java:19) at org.netbeans.api.visual.graph.GraphScene.addNode(GraphScene.java:100) at vislibdemo.GraphSceneImpl.(GraphSceneImpl.java:34) at vislibdemo.Main.initComponents(Main.java:39) at vislibdemo.Main.(Main.java:28) at vislibdemo.Main.main(Main.java:22) Caused by: java.lang.ClassNotFoundException: org.openide.util.LookupListener at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) ... 7 more

I guess I got a problem with the libraries... but I added them exactly as the tutorial said I should. I'm quite new in Java, so I have no idea what's wrong. If you had even the beginning of a solution... I'm using Netbeans 6.9 on Windows 7.

Thanks for all the help you could provide.

+1  A: 

All right... looks like I found a possible answer. The Tutorial I linked uses "ImageUtilities.loadImage", which, strangely enough, seems not to work. You have to use Utilities.loadImage. And then, it works ! (Yeeehaw !) If I find a way to notify the guy who made the tutorial, I'll tell him.

If anybody has the same trouble, this might not be the best solution, but if you are from the "whatever works" school, help yourself.

Raveline
A: 

I have the same problem, but have it solved differently. I included org-openide-util-lookup.jar in libraries, and then it compile OK. I figured that out by looking the results wen building, it shows something wrong with the lookup. Sounds like a refactoring or something like that. :)

Flavio