Closed OlivierBaudry closed 9 years ago
What version of Java are you using? You need to have Java 7 btw.
Java 7 mise à jour 65 (build 1.7.0_65-b17) on Mac OS Lion 10.7.5
o.k. this might not be the same version of java that maven is using. If you open a terminal and type
mvn -version
what output do you get?
I get this: Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100) Maven home: /usr/share/maven Java version: 1.6.0_65, vendor: Apple Inc. Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home Default locale: fr_FR, platform encoding: MacRoman OS name: "mac os x", version: "10.7.5", arch: "x86_64", family: "mac"
o.k. so maven is actually using Java 6. You therefore need to update your Java home to point to 1.7. In my installation this is at:
/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/jre
So I Install Java 7 with package : jre-7u67-macosx-x64 on Mac Os Lion. On Mac os I open Preferences Systeme, Java, I can read : Version Java 7 mise à jour 67, I can read : 1.7 1.7.0_67 http://java.sun.com/products/autodl/j2se in path: /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java
So on terminal if I write java -version I obtain 1.6.0_65
How must i do it to install protege?
There's some confusion here. I thought you were trying to compile Protege (using Maven) - based on the title of the issue, but I've just gone back and read your first post and it seems like you are just trying to run Protege. Sorry about this confusion.
So on terminal if I write java -version I obtain 1.6.0_65
This isn't correct. You need it to read 1.7xxxxxxx e.g.
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
For some reason installing the JRE does not update the symbolic links to the new JRE on OS X. I would therefore install the JDK rather than the JRE. See here
http://docs.oracle.com/javase/7/docs/webnotes/install/mac/mac-jre.html
for more information. You can get the JDK here
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
I can read now : java version "1.7.0_67" Java(TM) SE Runtime Environment (build 1.7.0_67-b01) Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
Glad it's sorted.
so it's not poosible to run protege now
some errors: /Applications/Protege_5.0_beta/run.command ; exit; Exception in thread "main" java.lang.UnsupportedClassVersionError: org/protege/osgi/framework/Launcher : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
I can read now : java version "1.7.0_67" Java(TM) SE Runtime Environment (build 1.7.0_67-b01) Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
How did you get this information? Did you get it from the terminal window?
yes of course
o.k. thanks for the info. I'm having difficulty figuring out what's going on!
Next question, do you type run.command in the terminal or do you double click on it in the Finder?
I double click on it on the finder so i's a same result if I write run.command in terminal
Sorry, but I'm not too sure what's going on. The last error trace that you posted indicates that you're NOT running java 7, but the java -version info that you posted indicates that you are.
As a double check please do the following and copy and paste what you type and the results into the reply to this please.
cd /Applications/Protege_5.0_beta/
java -version
./run.command
Sorry, to be so prescriptive but we need to make sure we are doing the same thing.
This is what mine looks like (I have Protege installed in a slightly different location):
Last login: Fri Aug 15 12:20:16 on ttys001
-bash: /usr/local/etc/bash_completion.d/git-prompt.shexport: No such file or directory
matthewhorridge > cd /Applications/Protege_5/
matthewhorridge > java -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
matthewhorridge > ./run.command
Starting Protege Desktop (Version 5.0.0, Build = beta-15)
Platform:
Java: JVM 1.7.0_51-b13 Memory: 466M
Language: en, Country: GB
Framework: Apache Software Foundation (1.5)
OS: macos (10.9.2)
Processor: x86-64
Plugin: Cajun Visualization Library (1.0.2)
Plugin: Pellet Reasoner Plug-in (2.2.0)
Plugin: Guava: Google Core Libraries for Java (17.0.0)
Plugin: JFact Plug-in 1.0 (1.0.0)
Plugin: DL Query (1.1.4)
Plugin: OPPL (1.5.5)
Plugin: OWLViz (4.1.4)
Plugin: OWL Code Generation Plug-in (1.0.2)
Plugin: OWL Difference (4.1.1)
Plugin: Protege Editor OWL (5.0.0.beta-15)
Plugin: Protege SPARQL Plugin (1.0.0)
Plugin: Explanation Workbench (1.0.0)
Plugin: Protege HermiT Integration (1.0.0)
Plugin: OntoGraf (1.0.3)
Plugin: OWL Difference Engine (1.0.1)
Plugin: OWLAPI RDF Library (1.0.2)
Plugin: OWLAPI Distribution (3.5.0)
Cajun Visualization Library Plugin has no plugin.xml resource
Guava: Google Core Libraries for Java Plugin has no plugin.xml resource
OWL Difference Engine Plugin has no plugin.xml resource
OWLAPI RDF Library Plugin has no plugin.xml resource
OWLAPI Distribution Plugin has no plugin.xml resource
Using OWL API version 3.5.0
Rebuilding entity indices...
... rebuilt in 5 ms
Setting active ontology to OntologyID(OntologyIRI(<http://www.semanticweb.org/matthewhorridge/ontologies/2014/7/untitled-ontology-506>))
Rebuilding entity indices...
... rebuilt in 0 ms
... active ontology changed
Cannot generate ontology catalog for ontology at http://www.semanticweb.org/matthewhorridge/ontologies/2014/7/untitled-ontology-506
Setting active ontology to OntologyID(OntologyIRI(<http://www.semanticweb.org/matthewhorridge/ontologies/2014/7/untitled-ontology-506>))
Rebuilding entity indices...
... rebuilt in 0 ms
... active ontology changed
Auto-update last performed: Fri Aug 15 11:55:46 PDT 2014
Auto-update has not been performed today. Running it.
mbpdeolerbaudry:~ olivierbaudry$ cd /Applications/Protege_5.0_beta mbpdeolerbaudry:Protege_5.0_beta olivierbaudry$ java -version java version "1.6.0_65" Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609) Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode),
-> I dont know which result of first command his different of response in terminal if i write java -version I obtain java version "1.7.0_67" Java(TM) SE Runtime Environment (build 1.7.0_67-b01) Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
so I retry in a same terminal a simple command java -version mbpdeolerbaudry:~ olivierbaudry$ java -version java version "1.6.0_65" Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609) Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode) mbpdeolerbaudry:~ olivierbaudry$ java -version java version "1.7.0_67" Java(TM) SE Runtime Environment (build 1.7.0_67-b01) Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode) mbpdeolerbaudry:~ olivierbaudry$
and continue on protege folder like this :
mbpdeolerbaudry:~ olivierbaudry$ cd /Applications/Protege_5.0_beta
mbpdeolerbaudry:Protege_5.0_beta olivierbaudry$ java -version
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
mbpdeolerbaudry:Protege_5.0_beta olivierbaudry$ ./run.command
Starting Protege Desktop (Version 5.0.0, Build = beta-15)
Platform:
Java: JVM 1.7.0_67-b01 Memory: 466M
Language: fr, Country: FR
Framework: Apache Software Foundation (1.5)
OS: macos (10.7.5)
Processor: x86-64
Plugin: Cajun Visualization Library (1.0.2)
Plugin: Guava: Google Core Libraries for Java (17.0.0)
Plugin: DL Query (1.1.4)
Plugin: OWLViz (4.1.4)
Plugin: OWL Code Generation Plug-in (1.0.2)
Plugin: OWL Difference (4.1.1)
Plugin: Protege Editor OWL (5.0.0.beta-15)
Plugin: Protege SPARQL Plugin (1.0.0)
Plugin: Explanation Workbench (1.0.0)
Plugin: Protege HermiT Integration (1.0.0)
Plugin: OntoGraf (1.0.3)
Plugin: OWL Difference Engine (1.0.1)
Plugin: OWLAPI RDF Library (1.0.2)
Plugin: OWLAPI Distribution (3.5.0)
Cajun Visualization Library Plugin has no plugin.xml resource
Guava: Google Core Libraries for Java Plugin has no plugin.xml resource
OWL Difference Engine Plugin has no plugin.xml resource
OWLAPI RDF Library Plugin has no plugin.xml resource
OWLAPI Distribution Plugin has no plugin.xml resource
Using OWL API version 3.5.0
Rebuilding entity indices...
... rebuilt in 6 ms
Setting active ontology to OntologyID(OntologyIRI(http://www.semanticweb.org/olivierbaudry/ontologies/2014/7/untitled-ontology-19))
Rebuilding entity indices...
... rebuilt in 2 ms
... active ontology changed
Cannot generate ontology catalog for ontology at http://www.semanticweb.org/olivierbaudry/ontologies/2014/7/untitled-ontology-19
Setting active ontology to OntologyID(OntologyIRI(http://www.semanticweb.org/olivierbaudry/ontologies/2014/7/untitled-ontology-19))
Rebuilding entity indices...
... rebuilt in 2 ms
... active ontology changed
Aug 15 22:39:11 mbpdeolerbaudry java[9100]
OK, so you have both java 1.6 and 1.7 on your machine. We need to make sure that you are using always Java 1.7 for Protege.
The solution is as follows:
Open a terminal, and type:
/usr/libexec/java_home -v 1.7
Copy the path that you get back. For example, I get:
/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home
Then edit the run.sh file in your Protege installation directory. Replace "java" with the full path: add the path from above + "/bin/" before "java", so the java line in run.sh, would look something like:
/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/bin/java -Xmx500M -Xms250M
Save run.sh, and run Protege again with run.command, and it should work.
Closing this as we now bundle Java 8 with the distribution.
Try it
/Applications/Protege_5.0_beta/run.command ; exit; Exception in thread "main" java.lang.UnsupportedClassVersionError: org/protege/osgi/framework/Launcher : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) logout
[Opération terminée]