Skip to content
Permalink
Browse files
1061: The skara update command is broken for platforms without downlo…
…aded JDK

Reviewed-by: ehelin
  • Loading branch information
erikj79 committed May 27, 2021
1 parent 2eb3dab commit b54fecb43c30eeab4cc1a8c663ad646056a9006c
Showing with 4 additions and 4 deletions.
  1. +4 −4 gradle/plugins/skara-images/src/main/java/org/openjdk/skara/gradle/images/LaunchersTask.java
@@ -92,16 +92,16 @@ void generate() throws IOException {
try (var w = Files.newBufferedWriter(file)) {
w.write("@echo off\r\n");
w.write("set DIR=%~dp0\r\n");
w.write("set JAVA_HOME=%DIR%..\\image\r\n");
w.write("\"%JAVA_HOME%\\bin\\java.exe\" %SKARA_JAVA_OPTS% " + optionString + " --module " + clazz + " %*\r\n");
w.write("set JAVA_LAUNCHER=%DIR%..\\image\\bin\\java.exe\r\n");
w.write("\"%JAVA_LAUNCHER%\" %SKARA_JAVA_OPTS% " + optionString + " --module " + clazz + " %*\r\n");
}
} else {
var file = dest.resolve(filename);
try (var w = Files.newBufferedWriter(file)) {
w.write("#!/bin/sh\n");
w.write("DIR=$(dirname \"$0\")\n");
w.write("export JAVA_HOME=\"${DIR}/../image\"\n");
w.write("\"${JAVA_HOME}/bin/java\" $SKARA_JAVA_OPTS " + optionString + " --module " + clazz + " \"$@\"\n");
w.write("JAVA_LAUNCHER=\"${DIR}/../image/bin/java\"\n");
w.write("\"${JAVA_LAUNCHER}\" $SKARA_JAVA_OPTS " + optionString + " --module " + clazz + " \"$@\"\n");
}
if (file.getFileSystem().supportedFileAttributeViews().contains("posix")) {
var permissions = PosixFilePermissions.fromString("rwxr-xr-x");

1 comment on commit b54fecb

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on b54fecb May 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.