So I've gone through a number of posts on here trying various solutions.
My problem is not a new one - I have a simple project I created to setup some Selenium boilerplate.
My project is basically:
projectRootFolder
---JRE System Lib
---src
-----my.custom.package
-------[customclass1.java, customclass2.java, etc.]
---Reference Libraries
---drivers
---lib
-----[byte-buddy, clent-combined-sources, client-combined, commons-exec, guav, okhttp, okio]
In my main class, the first line is:
WebDriverWrapper wdw = new WebDriverWrapper();
A simple wrapper class I made, when I set a breakpoint on it and hit F5 in debug mode, I get:
Launcher$AppClassLoader.loadClass(String, boolean) line: 325
And similar errors as I continue pressing F5. Alot of solutions say to do some of these things:
- Go to Window > Preferences > Java > Installed JRE's. Set the Installed JRE to the path of your JDK's directory. Typically C:\Program Files\Java\jdk.major.Version_123.
Did that, with my JDK's folder being the only one listed in the pane. I removed the default JRE. No luck.
Click Edit Source Lookup and add your project folder, then stop debugging and start a new debug session. Nada.
Close open projects and all .java files
Went to Windows > Java > Installed JRE's > my jdk > Edit, and see there is no source attachment listed for the entries, which makes sense. However, where (if any) do source attachments live for a JDK's JAR's by default?
First few entries are:
C:\Program Files\Java\jdk1.8.0_221\jre\lib\resources.jar
\rt.jar
\jsse.jar
\jce.jar
and about 15 others.
Also tried going to Debug Configurations and enabling Include system libraries when searching for a main class, no change after retrying debug, so I set it back to unselected.
In my debug config on the JRE tab, Runtime JRE is set to my installed jdk.
On the Classpath tab, I have JRE System Library [Java SE-1.8] under Bootstrap Entries and under User Entries I have projectRootFolder (default classpath).
On the Source tab I have projectRootFolder, jre1.8.0_221 - C:\Program Files\Java, jdk1.8.0_221 - C:\Program Files\Java, and Default under which are all the JDK's JAR files in either the JDK's \jre\lib or \jre\lib\ext subfolders in one section, and my projectRootFolder with the Selenium dependent JARS.
In my case I cannot simply use Maven, install a couple plugins and bam everything has source.
Can provide more details, just not sure what I should be looking for at this point.
Any help at all greatly appreciated.
EDIT: So did a quick search for jdk1.8.0_221 src.zip and the second result is this site: https://bgasparotto.com/extract-src-zip-jdk-installer
So evil Oracle doesn't make it easy to get to anymore, the only .zip's in my jdk directory under program files are:
- ffcjext.zip
- javafx-src.zip
I can't even run the installer from Oracle's site without admin rights which I don't have, but I hope this might help someone in the future.