#Keep getting module not found error in module-info.java
1 messages · Page 1 of 1 (latest)
<@&987246399047479336> please have a look, thanks.
I downloaded the JARS and added them to my project from Project Structure -> Libaries but I keep getting this error and I cant figure out why im getting it
This is a gradle project if helpful
@sharp quiver Sorry to ping, but could this be one of the things you were saying about maven being easier than gradle to work with?
it doesnt really have to do anything with maven/gradle
Whats causing the issue then? Am I importing wrong?
Ive looked all over stackoverflow and the google and found nothing that has helped this issue
I downloaded the JARS and added them
why not adding it through gradle if you use it?
no need to download the jars
@round jewel where are you getting jung.algorithms from?
From the JAR
I couldnt get it to build using the gradle code i found online
If anyone could help me with that I would rly appreciate
All three highlighted have the same error
Intellij Edu
Mac OS
...hmm are you using maven?
Gradle
where is it failing?
So i get error: module not found: jung.algorithms
requires jung.algorithms; for jung.graph.impl;
and jung.api
can you paste your build.gradle?
and does your build file have
implementation 'net.sf.jung:jung-algorithms:2.1.1' in it?
(or implementation("net.sf.jung:jung-algorithms:2.1.1") if you are doing the kotlin gradle thing)
they are manually adding a jar instead of using gradle
and I think he runs it with gradle
but didnt include the jar
or the dependency directly
I downloaded the JARS and added them to my project from Project Structure -> Libaries
is not enough if its a gradle project
and you wouldnt download a jar manually anyways if using gradle
I know, i just want them to figure that out for themselves
@round jewel
Your question has been closed due to inactivity.
If it was not resolved yet, feel free to just post a message below
to reopen it, or create a new thread.
Note that usually the reason for nobody calling back is that your
question may have been not well asked and hence no one felt confident
enough answering.
When you reopen the thread, try to use your time to improve the quality
of the question by elaborating, providing details, context, all relevant code
snippets, any errors you are getting, concrete examples and perhaps also some
screenshots. Share your attempt, explain the expected results and compare
them to the current results.
Also try to make the information easily accessible by sharing code
or assignment descriptions directly on Discord, not behind a link or
PDF-file; provide some guidance for long code snippets and ensure
the code is well formatted and has syntax highlighting. Kindly read through
https://stackoverflow.com/help/how-to-ask for more.
With enough info, someone knows the answer for sure 👍
@rose torrent @pliant token hey, so sorry i disappeared, an emergency came up
plugins {
id 'java'
id 'application'
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()
}
ext {
junitVersion = '5.8.2'
}
sourceCompatibility = '18'
targetCompatibility = '18'
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
application {
mainModule = 'com.example.aagtool'
mainClass = 'com.example.aagtool.HelloApplication'
}
javafx {
version = '18.0.1'
modules = ['javafx.controls', 'javafx.fxml']
}
dependencies {
testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitVersion}")
implementation 'org.jgrapht:jgrapht-core:1.5.2'
implementation 'org.jgrapht:jgrapht-ext:1.5.2'
}
test {
useJUnitPlatform()
}
jlink {
imageZip = project.file("${buildDir}/distributions/app-${javafx.platform.classifier}.zip")
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
launcher {
name = 'app'
}
}
jlinkZip {
group = 'distribution'
}```
Detected code, here are some useful tools:
I did that before but started getting this error
Should I just be adding implementation(.....) for each library i want to use instead of dowloading the JARs?
try adding these two:
implementation 'net.sf.jung:jung-graph-impl:2.1.1'
implementation 'net.sf.jung:jung-api:2.1.1'
though I doubt that is needed if you have jgrapht
it could be that your module-info is wrong
Ive got these two and those errors occur
What could be possibly causing the issue?
did you reload gradle?
I did
idk why not sharing the module-info?
Its just when I run the code it breaks and those 20 errors come up
yeah ok, wait for someone to help you with this
I tried switching to use SwingNode instead but I'm having import issue with that as well
So im wondering if its something I'm doing when I import cos i thought SwingNode was included in the JavaFX library?