protegeproject / protege

Protege Desktop
http://protege.stanford.edu
Other
995 stars 231 forks source link

Unable to open OWL file by double-clicking it in Windows 10 #547

Open johardi opened 7 years ago

johardi commented 7 years ago

Steps to reproduce:

  1. Double click an OWL file. You might need to associate .owl with Protege in the "Open with..." dialog.
  2. Protege will throw an error dialog with messages as below:
java.lang.IllegalStateException: The ontology loader must be called from the Event Dispatch Thread
    at org.protege.editor.owl.model.io.OntologyLoader.loadOntology(OntologyLoader.java:52)
    at org.protege.editor.owl.model.OWLModelManagerImpl.loadOntologyFromPhysicalURI(OWLModelManagerImpl.java:277)
    at org.protege.editor.owl.OWLEditorKit.handleLoadFrom(OWLEditorKit.java:189)
    at org.protege.editor.core.ProtegeManager.createAndSetupNewEditorKit(ProtegeManager.java:171)
    at org.protege.editor.core.ProtegeManager.createAndSetupNewEditorKit(ProtegeManager.java:193)
    at org.protege.editor.core.ProtegeApplication.createAndSetupDefaultEditorKit(ProtegeApplication.java:506)
    at org.protege.editor.core.ProtegeApplication.startApplication(ProtegeApplication.java:428)
    at org.protege.editor.core.ProtegeApplication.reallyStart(ProtegeApplication.java:109)
    at org.protege.editor.core.ProtegeApplication.lambda$start$15(ProtegeApplication.java:90)
    at org.protege.editor.core.ProtegeApplication$$Lambda$24/1575633438.frameworkEvent(Unknown Source)
    at org.apache.felix.framework.util.EventDispatcher.invokeFrameworkListenerCallback(EventDispatcher.java:836)
    at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:786)
    at org.apache.felix.framework.util.EventDispatcher.run(EventDispatcher.java:1099)
    at org.apache.felix.framework.util.EventDispatcher.access$000(EventDispatcher.java:55)
    at org.apache.felix.framework.util.EventDispatcher$1.run(EventDispatcher.java:102)
    at java.lang.Thread.run(Thread.java:745)
csnyulas commented 7 years ago

Same happens in Windows 7!

Note: Both in Win 10 and Win 7 this happens if you associate the .owl file to the Protege.exe application. If you associate it to the run.bat batch file, it works! The only drawback is that you won't have the nice Protégé icons displayed on the .owl files.

csnyulas commented 7 years ago

This issue was orignally reported on our mailing list: http://protege-project.136.n4.nabble.com/bug-report-td4666558.html

johardi commented 7 years ago

Associating the .owl file to the run.bat doesn't work in Win 10

msinclair2 commented 7 years ago

Thank you for creating this thread. I concur with johardi, association with run.bat does not solve the problem for me in Win 10.

csnyulas commented 7 years ago

The association with the run.bat works in Windows 7, while the association with Protege.exe does not. Since originally the bug was reported on the association with Protege.exe, I assumed that the run.but behaves similarly on Windows 10 to Windows 7, but could not test it. I am sorry for the mistake.

jmkeil commented 1 year ago

I think this issue is solved/obsolete and can be closed. But there is now another issue regarding opening files with Protege.exe: #1162