Skip to content

Commit

Permalink
correct bug about path formatting in windows
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosuc3m committed Dec 18, 2023
1 parent 2d6bdc2 commit cf6130a
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -704,11 +704,12 @@ private List<String> getProcessCommandsWithoutArgs() throws IOException, URISynt
ProtectionDomain protectionDomain = Tensorflow1Interface.class.getProtectionDomain();
String codeSource = protectionDomain.getCodeSource().getLocation().getPath();
String f_name = URLDecoder.decode(codeSource, StandardCharsets.UTF_8.toString());
for (File ff : new File(f_name).getParentFile().listFiles()) {
if (ff.getName().startsWith(JAR_FILE_NAME) && !ff.getAbsolutePath().equals(f_name))
continue;
classpath += ff.getAbsolutePath() + File.pathSeparator;
}
f_name = new File(f_name).getAbsolutePath();
for (File ff : new File(f_name).getParentFile().listFiles()) {
if (ff.getName().startsWith(JAR_FILE_NAME) && !ff.getAbsolutePath().equals(f_name))
continue;
classpath += ff.getAbsolutePath() + File.pathSeparator;
}
String className = Tensorflow1Interface.class.getName();
List<String> command = new LinkedList<String>();
command.add(padSpecialJavaBin(javaBin));
Expand Down

0 comments on commit cf6130a

Please sign in to comment.