File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -174,11 +174,9 @@ jobs:
174174
175175 - name : Create Windows installer
176176 run : |
177- # Shorten JAVA_HOME to avoid "filename or extension is too long" ( CreateProcess env limit)
177+ # Junction for short JAVA_HOME (used only when calling jpackage to avoid CreateProcess path limit)
178178 if (Test-Path C:\j) { cmd /c rmdir C:\j }
179179 cmd /c mklink /J C:\j $env:JAVA_HOME
180- $env:JAVA_HOME = "C:\j"
181- $env:PATH = "C:\j\bin;C:\Windows\System32;C:\Windows"
182180 subst X: $env:GITHUB_WORKSPACE
183181 New-Item -ItemType Directory -Force -Path "C:\t" | Out-Null
184182 cd X:\desktop-client
@@ -192,6 +190,9 @@ jobs:
192190 if (Test-Path "src\main\resources\icons\app-icon.ico") {
193191 $ICON_ARG = "--icon src\main\resources\icons\app-icon.ico"
194192 }
193+ # Short PATH only for jpackage to avoid "filename or extension is too long"
194+ $env:JAVA_HOME = "C:\j"
195+ $env:PATH = "C:\j\bin;C:\Windows\System32;C:\Windows"
195196 jpackage --input target `
196197 --name "JSTutor" `
197198 --main-jar $JAR_NAME `
Original file line number Diff line number Diff line change 7676 - name : Build installers and portable app image (Windows)
7777 if : matrix.os == 'windows-latest'
7878 run : |
79- # Shorten JAVA_HOME to avoid "filename or extension is too long" ( CreateProcess env limit)
79+ # Junction for short JAVA_HOME (used only when calling jpackage to avoid CreateProcess path limit)
8080 if (Test-Path C:\j) { cmd /c rmdir C:\j }
8181 cmd /c mklink /J C:\j $env:JAVA_HOME
82- $env:JAVA_HOME = "C:\j"
83- $env:PATH = "C:\j\bin;C:\Windows\System32;C:\Windows"
8482 subst X: $env:GITHUB_WORKSPACE
8583 New-Item -ItemType Directory -Force -Path "C:\t" | Out-Null
8684 cd X:\desktop-client
9492 if (Test-Path "src\main\resources\icons\app-icon.ico") {
9593 $ICON_ARG = "--icon src\main\resources\icons\app-icon.ico"
9694 }
95+ # Short PATH only for jpackage to avoid "filename or extension is too long"
96+ $env:JAVA_HOME = "C:\j"
97+ $env:PATH = "C:\j\bin;C:\Windows\System32;C:\Windows"
9798 jpackage --input target `
9899 --name "JSTutor" `
99100 --main-jar $JAR_NAME `
You can’t perform that action at this time.
0 commit comments