Include only tools.jar as "system jar", not the entire jre/../lib folder
See original GitHub issueHello,
I have a folder structure as below:
- root
- jre
- JRE files (“java.home” points to this)
- lib
- my jars
- jre
The current logic within JREUtils is seeing all my jars within this “lib” folder as “system jars”:
if (javaHomeFile.getName().equals("jre")) {
// Handle jre/../lib/tools.jar
final File parent = javaHomeFile.getParentFile();
if (parent != null) {
final File parentLibFile = new File(parent, "lib");
addJREPath(parentLibFile, jrePathsSet);
}
}
Would it be possible - and sensible - to only regard “tools.jar” as a system jar, instead of the entire “lib” folder?
This was tested with version 3.1.0.
Issue Analytics
- State:
- Created 5 years ago
- Comments:16 (11 by maintainers)
Top Results From Across the Web
Unable to locate tools.jar - java - Stack Overflow
I am building a project in Java. I have installed a JDK and the folder: C:\Program Files\Java\jre6\lib is in my system but the...
Read more >Where to put tools.jar in JRE 7? - Ideas Not For Sale
So I guess it means that the only true place for tools.jar is the jre/lib folder! Share this: Twitter · Facebook ...
Read more >Tools.jar not found !
Hi Pratha,. This issue is caused when the tools.jar file is not present in the $JAVA_HOME/lib directory (in the application server machine).
Read more >jdeps - Oracle Help Center
The input class can be a path name to a .class file, a directory, a JAR file, or it can be a fully...
Read more >How Classes are Found
The tools classes are now in a separate archive (tools.jar) and can only be used if included in the user class path (to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@lukehutch looks good. I tested
"lib:"
,"lib:my.jar"
,"lib:prefix*"
; it took me longer, because I had a problem with the log (with .verbose()) not being generated at all. Turned to be an out-of-memory issue on my part; obviously all this lib scanning needs to be done carefully.Thank you for your support, and I’ll just take advantage of the opportunity to tell you that this is an awesome little project - good luck with all!
Oops, ignore the last commit message, I referenced the wrong bug.