Wobster2007-11-04 21:38:56 UTCI have noticed that I cannot follow a reference to class, method, etc that is defined in a source that is associatedwith a jar file defined as a library. I have restarted NetBeans in case some type of initialization must be done, butthat didn't help.

Netbeans Swing-app-framework Library

I should be able to navigate to source associated with third party jars if they are associated in thelibrary definition right?Also, the sources for the third party jars do not show up by default in the available debugger sources. I had to add thesame source definition again. The debugger did find the source after adding it manually, but I got an exceptioneventually, which I reported BTW. Vitezslav Stejskal2007-11-05 13:06:08 UTCI tried the following and the navigation worked fine, but I got an exception every time I opened a JDOM source file (orclicked its editor tab). I'm going to attach the log file, but first the steps:- download JDOM 1.0 from- Tools - Libraries - New Library: name = JDOM, type = Class Libraries, added jaxen-.jar, saxpath.jar, xalan.jar,xerces.jar from /lib and /build/jdom.jar- add /src/java as a source root (Sources) and /build/apidocs (Javadoc)- create new Java Application project and add JDOM library into it- in Main class or any other class in the project write eg. Document jdomDoc = null; jdomDoc.getContent;- try ctrl-LMB click to navigate to the source file of Document class or its getContent methodIt seemed to work fine on my dev build with JDK5, except for the exception that poped out every time I opened a sourcefile from the library.

Tomas Zezula2007-11-05 17:51:21 UTCI've fixed the NPE.Checking in org/netbeans/modules/java/source/classpath/GlobalSourcePath.java;/cvs/java/source/src/org/netbeans/modules/java/source/classpath/GlobalSourcePath.java,v I tried the following and the navigation worked fine, but I got an exception every time I opened a JDOM source file (orclicked its editor tab). I'm going to attach the log file, but first the steps: - download JDOM 1.0 from- Tools - Libraries - New Library: name = JDOM, type = Class Libraries, added jaxen-.jar, saxpath.jar, xalan.jar,xerces.jar from /lib and /build/jdom.jar- add /src/java as a source root (Sources) and /build/apidocs (Javadoc)- create new Java Application project and add JDOM library into it- in Main class or any other class in the project write eg. Document jdomDoc = null; jdomDoc.getContent;- try ctrl-LMB click to navigate to the source file of Document class or its getContent methodIt seemed to work fine on my dev build with JDK5, except for the exception that poped out every time I opened a sourcefile from the library.it seems that the NPE was the only resting problem, right?Can you verify it? It will be hopefully in today's night build.Again thanks for your help. Wobster2007-11-06 16:14:08 UTCI did find one way to force the editor to follow the JDOM source.

For some odd reason, if I remove the jdom.jar from thelibrary and add a copy of it from another directory. The editor will follow the source. Now, if I remove the new versionfrom the library and then replace it with the path to the original jdom.jar, the editor still follows the source. When Ichange the library, the IDE does some recompiling of other sources and does some updating so perhaps there is areference that needed an update.The previous scenario also held true if I created an entirely new $HOME/dev directory by moving my old one to a backupand the copying my original library definitions to the new dev directory. Wobster2007-11-13 16:31:17 UTCI've just found another case where the IDE is not allowing navigation to the source. I just recently tried out the SwingApplication Framework integration in NetBeans (works great BTW!) and was trying to navigate to the source for Taskorg.jdesktop.application.Task. I downloaded and added path to the unzipped source for the Framework, navigated to Taskand then tried to navigate to org.jdesktop.swingworker.SwingWorker.

I downloaded and added the path to the unzippedsource (src/java) for the SwingWorker to the 'Swing Application Framework' library but could not navigate to the source.I tried restarting NetBeans, but that didn't work. I also tried removing the swing-worker.jar file from the library andre-adding it like I had done before, but that didn't work either. Tomas Zezula2007-11-14 13:25:58 UTCI've tried the sent projects, thanks for them, the navigation to Action (Ctrl+Click) worked fine but the navigation fromaction to SwingWorker didn't work. Was it this case?If even the navigation to Action doesn't work can you run the IDE with: -J-Dorg.netbeans.api.java.queries.level=300option? It will generate the logging info how the binaries are translated into sources. Please attach or send me themessages.log. Thanks.If the problem is that you are not able to navigate from Action to SwingWorker as I described above, this problem iscaused by the project setup and I doubt we can do anything with it.

The problem is:You downloaded the swing app framework sources and attached them to the Swing App Framework library (the jar files ofthese libraries are somewhere in NB folder). But the sources are complete project which provides it's own copy ofSwingWorker.jar. Wobster2007-11-14 14:04:27 UTCI was able to navigate to the sources for Action, but not for SwingWorker. Just to be clear about my setup, I unzippedthe sources for SwingWorker into another directory outside the application project and attached the source for it to theSwing Application Library using the path myswingworkerpath/src/java. I didn't (at least intentionally) use theswingworker.jar file in the source distribution. I'll try deleting the swingworker.jar from the source distribution tosee if that works. (NetBeans must have done some magic behind the scenes to find this jar file.)As a side note, it looks like the swingworker.jar bundled with the Swing Application Framework didn't have the debuggingsymbols turned on so I can't step through the code.

(Oddly enough, the source for Swing Worker did show up when Istepped through the code with the debugger even though I could not step through it.). Wobster2007-11-14 15:37:24 UTCI removed swingworker.jar from the downloaded AppFramework project and even moved the src directory out of the projectcompletely so that NetBeans wouldn't think that the src for the jsr296 framework was associated with another NetBeansproject. So the only jar files referenced now are the ones bundled with the NetBeans IDE.(See and)But, I still cannot navigate to the SwingWorker source and the IDE editor seems to think that the SwingWorker classisn't defined. (See ) The jar fileis in the classpath though since the compiler can compile the project without errors.When I debug the application, the debugger can find the source for the SwingWorker, but since debug symbols aren'tturned on it only displays the source. Tomas Zezula2007-11-14 16:25:47 UTC(NetBeans must have done some magic behind the scenes to find this jar file.)It's not a magic, it's quite logical behavior.There was a library having 2 jar files af.jar (short name for app-framewrok) and sw.jar (short name for swingworker.jar)stored in NetBeans, say /netbeans/ folder). You downloaded sources and created let's say /libs/af and /libs/sw folders andadd the folders /libs/af/src and /libs/sw/src/java to app framework library.So we have:/netbeans/./af.jar/netbeans/./sw.jarwhich maps to following sources:/libs/af/src//libs/sw/src/javabut the /libs/af/src/ is a project which provides it's own classpath which is different from the classpath of yourproject.

The /libs/af project has /libs/af/libs/sw.jar on classpath which has nothing in common with the/netbeans/./sw.jar for which you defined the source root = it cannot find the sources for classes in/libs/af/libs/sw.jar, it doesn't matter if there is debug info or not, there is no source root to which it will be related. Wobster2007-11-14 19:21:22 UTCWhy did the source not show up when I moved the src directory out of the NetBeans project for appframework into asibling directory?

(jsr296/appframework/src and jsr296/appframework/AppFramework rather thanjsr296/appframework/AppFramework/src)I still needed to delete the nbproject out of jsr296/appframework/AppFramework to cure the problem. Could there be acaching problem or is the project still found somehow even though the src is in a sibling folder to the NetBeansproject?

(There shouldn't be any ties to the two directories once I moved the src directory should there?). Tomas Zezula2007-11-15 08:23:01 UTCWhy did the source not show up when I moved the src directory out of the NetBeans project for appframework into asibling directory? (jsr296/appframework/src and jsr296/appframework/AppFramework rather thanjsr296/appframework/AppFramework/src)This should work fine, if you correct the library definition to point to jsr296/appframework/src rather than tojsr296/appframework/AppFramewrok/src, also you have not to correct the project source root reference to point tothe new source root. By other words the jsr296/appframework/src must not be owned by the project.I still needed to delete the nbproject out of jsr296/appframework/AppFramework to cure the problem. Could there be acaching problem or is the project still found somehow even though the src is in a sibling folder to the NetBeansproject? (There shouldn't be any ties to the two directories once I moved the src directory should there?)There is no persistent cache for such a information.

Have you tried the modified Application Framework I've sent to youyesterday? It should work fine. Wobster2007-11-15 14:44:04 UTCThis should work fine, if you correct the library definition to point to jsr296/appframework/src rather than tojsr296/appframework/AppFramewrok/src, also you have not to correct the project source root reference to point tothe new source root. By other words the jsr296/appframework/src must not be owned by the projectI think I did change the library definition to point to the new source, but I'll repeat the test to see if it workswithout removing the nbproject directory.BTW, why does the editor try to automatically include.jar files from sources associated with the library if I didn'texplicitly specify the jar file in the library definition? I think that has been the most confusing part.Why did the debugger find the source when the editor couldn't? (They must be using different algorithms.)Is there a way to include a jar file with source in it that doesn't have the root of the package at the root of the jar?(i.e.

Rather than the typical project/src/com/domain/.). Wobster2007-11-16 13:21:03 UTCI am not sure if I got this question. You need to attach sources contained in some jar(zip) for which the file root isnot source root, right? There is no UI for it, but you can do following.

Netbeans Swing-app-framework Library Login

Add the jar file like the root was the sourceroot and then edit the library definition and change the root by hand.You need to do something like this, in this case the source root is src folder in src.zip: src jar:file:/usr/lib/mylib/src.jar!/to: src jar:file:/usr/lib/mylib/src.jar!/src/That is exactly what I need. If it isn't there already, I'll submit an enhancement request to add this capability to theUI.Thanks for answering all my questions!I still think there needs to be more feedback to the user regarding why the source isn't appearing or what jar file isbeing used. I realize that this is probably a special case since most of the time the jar and the src are probably fromthe same nb project and you wouldn't have this ambiguity problem. It might be good to bundle the srcs for all librariesbundled with NetBeans to avoid forcing people to download them separately or have the source available as an optionalplug-in.

Netbeans Java

(I didn't see that, but I'll check again.) I'd also encourage the NB team to compile all the bundled librarieswith debugging symbols turned on to make it easier to step through the code.

Free Download Of Netbeans App

Library Management System Using NetBeans Java Mysql ProjectLibrary Management System project using Netbeans GUI as a front end and MySQL as a back-end.