I am making JavaFX application as a university assignment and I want to include a .exe file of the application. However, while trying to build the application
gradlew run
I ran into java.lang.UnsupportedClassVersionError.
My build.gradle
:
plugins {
id 'java'
id 'application'
id 'org.openjfx.javafxplugin' version '0.0.8'
}
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
}
javafx {
modules = [ 'javafx.controls', 'javafx.fxml' ]
version = '13'
}
run{
standardInput = System.in
standardOutput = System.out
}
jar {
from {
configurations.runtime.collect {
it.isDirectory() ? it : zipTree(it)
}
configurations.compile.collect {
it.isDirectory() ? it : zipTree(it)
}
}
manifest {
attributes 'Main-Class': 'java.frontend.Main'
}
exclude 'META-INF/*.RSA', 'META-INF/*.SF','META-INF/*.DSA'
}
mainClassName = 'frontend.Main'
If I try to use grade -> build -> build and run the build/libs/"the built file" I have two errors:
Error: Could not find or load main class java.frontend.Main
Caused by: java.lang.ClassNotFoundException: java.frontend.Main