Closed hmf closed 4 years ago
[Auto response] Looks like this is your first issue. I will look into it as soon as possible.
Probably you need to change the sourceCompatibility
, targetCompatibility
, and javafx version to 11 in the build.gradle
file
@blaisewang My apologies but I was having problems pushing the changes.
I have already changed the JDK version here. As I said, in Gradle it works but the install
script fails.
Please note that the OS detection has bugs in your master. If you like, I can make a pull request.
@hmf I reviewed your code and figured out what might be wrong. This project was originally developed with JDK 11 since last year. So, using JDK 11 should not be a problem here. The problem is that you didn't modify the jdk_setup.sh script. The JDK you initially downloaded inside the jdk/
folder is actually JDK 14.
To build with JDK 11, you need to modify 19 to 21 lines of scripts/jdk_setup.sh
to
wget -nc -O $LINUX_JDK_FILE https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.6%2B10/OpenJDK11U-jdk_x64_linux_hotspot_11.0.6_10.tar.gz
wget -nc -O $MACOS_JDK_FILE https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.6%2B10/OpenJDK11U-jdk_x64_mac_hotspot_11.0.6_10.tar.gz
wget -nc -O $WINDOWS_JRE_FILE https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.6%2B10/OpenJDK11U-jdk_x64_windows_hotspot_11.0.6_10.zip
and re-download the JDK 11 to build.
The build process for this software is not building three versions on three platforms. The software was built in Ubuntu with Travis CI. The org.gradle.internal.os.OperatingSystem
couldn't use here as we are not building Windows version on a Windows PC.
21 - 30 lines of .travis.yml script explains how to do the cross-platform build. The -Plinux
parameter is passed with ./gradlew runtimeZip
, so the project.hasProperty("linux")
is true
. So does -Pwindows
for project.hasProperty("windows")
to be true
.
The OperatingSystem.current().isWindows()
part inside runtime
is redundant as launch4j
is used to build Windows version software.
I don't think it's a good idea to simply set javafx
- version
to ${compileJava.targetCompatibility}
. There are minor JavaFX version like 11.0.2. The code is compatible with JDK 11, but using JavaFX's latest version such as 11.0.2 is always good practice as a minor version comes with bug fixes and security improvements.
I am using a mac so I put -Pmacos
as the default situation to build with ./gradlew runtimeZip
. You can use ./gradlew -Plinux runtimeZip
to build the Linux version with JDK 11 if you set up JDK correctly inside jdk
folder.
@blaisewang Thanks for the heads-up. I will make the changes to the script and run Gradle via command line as you indicated above. Maybe these instrcuction could be aded to the documentation.
@hmf Haven't thought anyone would concern about the build process. I was hoping people would contribute to the functionality. Definitely will write a contribution / develop guideline if I have a spare weekend in the future.
Describe the bug I have changed the Gradle script to execute the application with the KDK 11 (LTS version). The changes can be found in my fork. They include a correction in the detection of the OS that was not working correctly (tested in Linux).
When I execute the application directly from the Gradle in the IDE, it works fine. However when I execute the bash script I get the following error:
To Reproduce Steps to reproduce the behavior:
img2latex-mathpix/build/install/Image2LaTeX/bin
./Image2LaTeX
Expected behavior I expect the application should execute us8ing the bash script as it does in Gradle.
Screenshots
Desktop (please complete the following information):
Additional context I cannot figure out how the class is compiled in a different version of JDK seeing as it is set in the Gradle script.