#set up jvm options for sdk library

33 messages ยท Page 1 of 1 (latest)

twin laurelBOT
#

โŒ› This post has been reserved for your question.

Hey @sinful wadi! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

tacit marsh
#

the main class would be com.example.javafx.HelloApplication

#

Are you using Maven?

sinful wadi
#

no

tacit marsh
#

What happens and what do you expect to happen?

tacit marsh
#

oh I see you have a build.gradle.kts with an error

#

Can you show that file and the errors you are getting there?

#

as well as all the files in your directory structure?

sinful wadi
# tacit marsh Can you show that file and the errors you are getting there?
  • [warn] The org.gradle.util.VersionNumber type has been deprecated.org.openjfx.javafxplugin
    • [warn] The org.gradle.util.VersionNumber type has been deprecated.org.openjfx.javafxplugin
    • [warn] The org.gradle.util.VersionNumber type has been deprecated.org.openjfx.javafxplugin
    • [warn] The Provider.forUseAtConfigurationTime method has been deprecated.org.openjfx.javafxplugin
    • [warn] The Provider.forUseAtConfigurationTime method has been deprecated.org.openjfx.javafxplugin
    • [warn] The Provider.forUseAtConfigurationTime method has been deprecated.org.openjfx.javafxplugin
    • [warn] The Provider.forUseAtConfigurationTime method has been deprecated.org.openjfx.javafxplugin
    • [warn] The Provider.forUseAtConfigurationTime method has been deprecated.org.openjfx.javafxplugin
  • org.javamodularity.moduleplugin
    • [warn] The AbstractCompile.destinationDir property has been deprecated.org.javamodularity.moduleplugin
tacit marsh
#

Can you show the full output?

tacit marsh
#

ok yeah so IntellIJ didn't properly import the project until now

#

Can you show the build.gradle.kts and the full output of the Gradle build?

#

Are there any lines in the build.gradle.kts underlined in red?

sinful wadi
tacit marsh
#

Also please share the code as text using a code block and not using images if possible

sinful wadi
#

all lines are red

tacit marsh
# sinful wadi

Did you maybe add Gradle/Groovy code in the build.gradle.kts?

fading sorrelBOT
#

import jdk.tools.jlink.resources.plugins


plugins {
   java
   application
   id("org.javamodularity.moduleplugin") version "1.8.12"
   id("org.openjfx.javafxplugin") version "0.0.13"
   id("org.beryx.jlink") version "2.25.0"
}

group = "com.example"
version = "1.0-SNAPSHOT"

repositories {
   mavenCentral()
}

val junitVersion = "5.10.2"

java {
   toolchain {
       languageVersion = JavaLanguageVersion.of(8)
   }
}

tasks.withType<JavaCompile> {
   options.encoding = "UTF-8"
}

application {
   mainModule.set("com.example.javafx")
   mainClass.set("com.example.javafx.HelloApplication")
}

javafx {
   version = "17.0.6"
   modules = listOf("javafx.controls", "javafx.fxml")
}

dependencies {
   testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}")
   testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitVersion}")
}

tasks.withType<Test> {
   useJUnitPlatform()
}

jlink {
   imageZip.set(layout.buildDirectory.file("/distributions/app-${javafx.platform.classifier}.zip"))
   options.set(listOf("--strip-debug", "--compress", "2", "--no-header-files", "--no-man-pages"))
   launcher {
       name = "app"
   }
} ```

This message has been formatted automatically. You can disable this using /preferences.

tacit marsh
#

Can you build the project from the CLI and show the output?

#

(as text)

#

It seems like you are using JDK 8 with javaFX 17 - you should probably update to a newer JDK

tacit marsh
#

ok

sinful wadi
tacit marsh
#

Where is that file from?

#

Can you show the stuff the ./gradlew build command prints to the console?

#

Do you have a Gradle tab in IntelliJ?

twin laurelBOT
#

๐Ÿ’ค Post marked as dormant

This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping.
Warning: abusing this will result in moderative actions taken against you.