Skip to content

Commit

Permalink
Add logic to point Windows runner to target/lib folder
Browse files Browse the repository at this point in the history
- The samples were failing to run on Windows because it was unable to
  find the dependent libraries for the main APDFL 18 DLL, even though
  the java.library.path argument was being set in the run command. It
  turns out there's a JDK bug where the java.library.path was not being
  honored on Windows systems:
  https://bugs.openjdk.org/browse/JDK-8213772?focusedCommentId=14222348&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14222348.

- As a workaround, let's add the path to the dependency DLLs to the system PATH
  and assign the java.library.path variable to the system PATH to see if that helps
  the samples run on Windows.
  • Loading branch information
datalogics-saharay committed Jan 26, 2024
1 parent dba8360 commit b8855ab
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/test-kotlin-samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ jobs:
run: mvn -e package
- name: Run samples
working-directory: ${{ matrix.dir }}
run: java -Djava.library.path=./target/lib -Dfile.encoding=UTF-8 -jar target/${{ matrix.dir }}-1.0-SNAPSHOT-jar-with-dependencies.jar
- name: List files
run: |
ls ${{ github.workspace }}
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
set PATH=%PATH%;${{ github.workspace }}/${{ matrix.dir }}/target/lib
echo %PATH%
java -Djava.library.path=%PATH% -Dfile.encoding=UTF-8 -jar target/${{ matrix.dir }}-1.0-SNAPSHOT-jar-with-dependencies.jar
elif [ "$RUNNER_OS" == "Linux" ]; then
java -Djava.library.path=./target/lib -Dfile.encoding=UTF-8 -jar target/${{ matrix.dir }}-1.0-SNAPSHOT-jar-with-dependencies.jar
fi

0 comments on commit b8855ab

Please sign in to comment.