Good afternoon,

 

I am running the latest versions of NetBeans (12.6), JDK 17 and MS-SQL JDBC driver 10.2 on Windows 10.

 

I want to integrate the JDBC sources into NetBeans so that, if I <Ctrl-Click> on a method (e.g. setAutoCommit of java.sql.Connection.setAutoCommit(boolean), NetBeans will take me to the source file and then allow me to drill-down further within the source of that method, just as I can do for my own methods.

 

I can do it for all of the JDK – (e.g. String class or String.length()) and this is excellent.

 

Firstly, I went to the ‘Projects’ tab, located the ‘Dependencies’ folder for my project and opened the folder to locate the jar file for the MS-SQL JDBC support.

I discovered that if you <right-click> on the mssql-jdbc-10.2.0.jre17.jar, you get an option to ‘Download the JavaDoc’ and ‘Add local sources’. I had previously downloaded the latest sources as a .zip file from https://github.com/microsoft/mssql-jdbc/releases into a folder on my local disk.

 

So, I selected both of those.

I Downloaded the JavaDoc as I didn’t know where the SQL JavaDoc was on the web.

For the Local Sources, I pointed at the zip file that I had previously downloaded.

 

Neither gave any confirmation of completion but when I <right-click> again, the options have disappeared and so I am assuming that NetBeans now knows about them.

 

Anyway, the JavaDoc download appears to have worked as get the relevant popup when hover over the method but when I <Ctrl-Click> the method it takes me into a generated interface with the message at the top of the tab saying “Showing generated source file. No sources are attached to class jar file”.

 

I googled that message and was pointed to the Tools > Java Platforms and while it looks to be just for the JDK, there was a Sources tab and an option to add in a zip to the long list that was already there. I therefore added the “mssql-jdbc-10.2.0.zip” file, containing the sources into the list and re-loaded NetBeans, but that didn’t appear to make any difference.

 

So, I must be missing a key link here. Can someone give me some advice as to what I am doing wrong

 

  1. How do I integrate the MS-SQL sources zip file into NetBeans
  2. Given that I have <right-click> on the mssql-jdbc-10.2.0.jre17.jar to ‘Add local sources’, how can I locate the environment setting that I gave NetBeans detailing the file location. <right-click> then Properties on the mssql-jdbc-10.2.0.jre17.jar file, tells me that ‘Sources locally’ is ticked and greyed out, but nothing more
  3. Out of curiosity, if I made a mistake and picked the wrong .zip file, how would I go about amending that setting to use a different .zip file.

 

If I unzip the sources that are within the .zip, then I can locate the full source of the method using an external editor, but I would obviously far rather use the power of NetBeans to create a fully integrated solution.

 

I love the fact that I can drilldown into the JDK, it gives me a valuable insight into how each of the methods is coded and a view of how others write their Java.

 

Thanks in advance

 

John

 

--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org For additional commands, e-mail: users-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to