Open Jerryy959 opened 2 years ago
Hi
I have this problem as well, and I solve it by configuring the library to jdk-16, hope this can help you.
I have the same problem. Do we need a specific jdk / maven version to run the simulator?
I have the following error:
administrator@CS4504-8 ~/PureEdgeSim> mvn exec:java -Dexec.mainClass="examples.Example1"
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.mechalikh:pureedgesim:jar:5.2.0
[WARNING] 'dependencies.dependency.systemPath' for net.sourceforge.jFuzzyLogic:jFuzzyLogic:jar should not point at files within the project directory, ${project.basedir}/PureEdgeSim/libs/jFuzzyLogic_v3.0.jar will be unresolvable by dependent projects @ line 378, column 16
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building PureEdgeSim 5.2.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- exec-maven-plugin:3.0.0:java (default-cli) @ pureedgesim ---
[WARNING]
java.lang.ClassNotFoundException: examples.Example1
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:433)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:586)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:519)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:246)
at java.base/java.lang.Thread.run(Thread.java:831)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.354 s
[INFO] Finished at: 2023-10-24T20:54:46-04:00
[INFO] Final Memory: 12M/50M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.0.0:java (default-cli) on project pureedgesim: An exception occured while executing the Java class. examples.Example1 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
My JDK is openjdk 16:
administrator@CS4504-8 ~/PureEdgeSim> java --version
openjdk 16.0.1 2021-04-20
OpenJDK Runtime Environment (build 16.0.1+9-Ubuntu-118.04)
OpenJDK 64-Bit Server VM (build 16.0.1+9-Ubuntu-118.04, mixed mode, sharing)
Anyone knows how to solve it?
I have the same problem. Do we need a specific jdk / maven version to run the simulator?
I also want to know it. Mine does not work.
administrator@CS4504-8 ~/PureEdgeSim> mvn --version
Apache Maven 3.2.3 (33f8c3e1027c3ddde99d3cdebad2656a31e8fdf4; 2014-08-11T16:58:10-04:00)
Maven home: /usr/local/apache-maven-3.2.3
Java version: 16.0.1, vendor: Private Build
Java home: /usr/lib/jvm/java-16-openjdk-amd64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.4.0-150-generic", arch: "amd64", family: "unix"
Hi, I'm running the project "Via Command Line". I use
mvn clean install
and all is well.But when i enter
mvn exec:java -Dexec.mainClass="examples.Example1"
, I get the error , the whole output follows:How can i solve this problem?