Skip to content

Commit

Permalink
Only add java.ext.dirs if the directory exists
Browse files Browse the repository at this point in the history
  • Loading branch information
alitokmen committed Jan 30, 2025
1 parent 16bfe7d commit a37ba9f
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,14 @@ protected void doStart(JvmLauncher java) throws Exception
.getAbsolutePath().replace(File.separatorChar, '/')
+ File.pathSeparatorChar
+ new File(javaLib, "endorsed").getAbsolutePath().replace(File.separatorChar, '/'));
java.setSystemProperty("java.ext.dirs", new File(getHome(), "lib/ext").getAbsolutePath()
.replace(File.separatorChar, '/')
+ File.pathSeparatorChar
+ new File(javaLib, "ext").getAbsolutePath().replace(File.separatorChar, '/'));
File extDir = new File(getHome(), "lib/ext");
if (extDir.isDirectory())
{
java.setSystemProperty("java.ext.dirs", extDir.getAbsolutePath()
.replace(File.separatorChar, '/')
+ File.pathSeparatorChar
+ new File(javaLib, "ext").getAbsolutePath().replace(File.separatorChar, '/'));
}
java.setSystemProperty("java.io.tmpdir", new File(getConfiguration().getHome(),
"/var/temp").getAbsolutePath().replace(File.separatorChar, '/'));

Expand Down

0 comments on commit a37ba9f

Please sign in to comment.