Невозможно запустить проект Java Apache Sparck MavenJAVA

Программисты JAVA общаются здесь
Anonymous
Невозможно запустить проект Java Apache Sparck Maven

Сообщение Anonymous »


When running the maven project i get the following error

Код: Выделить всё

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.2.0:java (default-cli) on project test_intelli: An exception occurred while executing the Java class. class org.apache.spark.storage.StorageUtils$ (in unnamed module @0x6f696f4) cannot access class sun.nio.ch.DirectBuffer (in module java.base) because module java.base does not export sun.nio.ch to unnamed module @0x6f696f4
with the following pom.xml

Код: Выделить всё


org.apache.spark
spark-core_2.12
3.5.1





org.codehaus.mojo
exec-maven-plugin
3.2.0

org.example.Main

--add-exports java.base/sun.nio.ch=ALL-UNNAMED
--add-exports java.base/sun.nio.cs=ALL-UNNAMED
/home/user/Desktop/input.txt






java version:
openjdk 21.0.2 2024-01-16
OpenJDK Runtime Environment (build 21.0.2+13)
OpenJDK 64-Bit Server VM (build 21.0.2+13, mixed mode, sharing)
maven version:
Maven home: /opt/maven
Java version: 21.0.2, vendor: N/A, runtime: /usr/lib/jvm/java-21-openjdk
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "6.7.8-zen1-1-zen", arch: "amd64", family: "unix"
i ran mvn exec:java but unfortunately i ran into exceptions that weren't supposed to occur
it looks like it kind of works through i intellij project but i really need for it to work from command line and not from an ide


Источник: https://stackoverflow.com/questions/781 ... en-project

Вернуться в «JAVA»