Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1 .- Could not find the main class: org.bp4mc2.archimate2rdf.Convert. Program will exit #1

Open
corinabioinformatic opened this issue Sep 17, 2019 · 2 comments

Comments

@corinabioinformatic
Copy link

Dear archimate2rdf team,
I passed a very simple model xml file (created in just 10 min in the Archimate Tool, and i am getting this error:


C:\>java -jar archimate2rdf.jar /archimate_test_files/test_archimateOExml.xml /archimate_test_rdf/test_archimateRDF.rdf
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/bp4mc2/archimate2rdf/Convert : Unsupported major.minor version 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(Unknown Source)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$000(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: org.bp4mc2.archimate2rdf.Convert. Program will exit.

Could I ask how to solve it?
I have the jar file just in the parent folder of the xml input and output.
I am using Archimate version 4.5.1.

@architolk
Copy link
Contributor

How did you compile the jar? Typically you would use maven (mvn clean package) which creates the appropriate jar in the target folder. You should at least use the java version 8 jdk.

@corinabioinformatic
Copy link
Author

corinabioinformatic commented Sep 18, 2019

How did you compile the jar? Typically you would use maven (mvn clean package) which creates the appropriate jar in the target folder. You should at least use the java version 8 jdk.

Thank you @architolk , It was the java jdk 8 PATH. The bin folder It was not in my global path environment. After download the java version 8 jdk and add the path into the %PATH% the problem is solved.

  1. Download java JSDK 8 (need to register in Oracle)
  2. Run in the cmd (as administrator)
    set PATH_HOME = %PATH_HOME%; "C:\Program Files (x86)\Java\jre1.8.0_51\bin"

After these 2 paths I also realized the file cannot contain spaces. Now is working perfectly. Many thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants