[isabelle-dev] compiling jedit for Isabelle development

Viorel Preoteasa viorel.preoteasa at abo.fi
Tue Mar 27 23:17:11 CEST 2012


On 3/27/12 11:59 PM, Makarius wrote:
> On Tue, 27 Mar 2012, Viorel Preoteasa wrote:
>
>> I am trying to use jedit with the Isabelle development version
>>
>> I have scala-2.9.1-1 and I downloaded jedit_build-20120313.
>>
>> I set the paths
>>
>> export 
>> SCALA_HOME=/Users/viorel/Work/isabelle-dev/isabelle/contrib/scala-2.9.1-1
>> export 
>> ISABELLE_JEDIT_BUILD_HOME=/Users/viorel/Work/isabelle-dev/isabelle/contrib/jedit_build-20120313
>
>> The file src/Tools/jEdit/README_BUILD says  to set 
>> ISABELLE_JEDIT_BUILD_HOME
>> via "init_component .../jedit_build...", but I don't know how to do it.
>
> Isabelle settings are configured via etc/settings, either directly 
> e.g. in your ~/.isabelle/etc/settings (for repository versions) or by 
> initializing some Isabelle component.  The Isabelle System manual 
> explains the general principles behind etc/settings and etc/components.
>
> The jedit_build-20120313 directory is already such a component, so if 
> you say init_component .../jedit_build-20120313 in your settings it 
> should work.
I managed to get this setting working. I have used the file 
../isabelle/etc/settings.
I was afraid that using the local .isabelle will overwrite the settings 
for the
release version of Isabelle (Isabelle2011-1).

After setting init_component .../jedit_build-20120313 I managed to 
compile jedit,
however I run into another problem. When starting isabelle jedit, I get 
an error
that some class is not found.

I am using OS X Lion (10.7.3). Both JAVA_HOME and ISABELLE_JDK_HOME are 
set to:

/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

using the script:
export JAVA_HOME="$(/usr/libexec/java_home -v 1.6)"
export ISABELLE_JDK_HOME="$(/usr/libexec/java_home -v 1.6)"

The error I get is:

12:04:21 AM [main] [error] PluginJAR: Error while starting plugin 
isabelle.jedit.Plugin
12:04:21 AM [main] [error] PluginJAR: java.lang.NoClassDefFoundError: 
scala/Serializable
12:04:21 AM [main] [error] PluginJAR:  at 
java.lang.ClassLoader.defineClass1(Native Method)
12:04:21 AM [main] [error] PluginJAR:  at 
java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
12:04:21 AM [main] [error] PluginJAR:  at 
java.lang.ClassLoader.defineClass(ClassLoader.java:615)
12:04:21 AM [main] [error] PluginJAR:  at 
java.lang.ClassLoader.defineClass(ClassLoader.java:465)
12:04:21 AM [main] [error] PluginJAR:  at 
org.gjt.sp.jedit.JARClassLoader._loadClass(JARClassLoader.java:439)
12:04:21 AM [main] [error] PluginJAR:  at 
org.gjt.sp.jedit.JARClassLoader.loadClass(JARClassLoader.java:109)
12:04:21 AM [main] [error] PluginJAR:  at 
java.lang.ClassLoader.loadClass(ClassLoader.java:247)
12:04:21 AM [main] [error] PluginJAR:  at 
isabelle.jedit.Plugin.<init>(plugin.scala:385)
12:04:21 AM [main] [error] PluginJAR:  at 
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
12:04:21 AM [main] [error] PluginJAR:  at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
12:04:21 AM [main] [error] PluginJAR:  at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
12:04:21 AM [main] [error] PluginJAR:  at 
java.lang.reflect.Constructor.newInstance(Constructor.java:513)
12:04:21 AM [main] [error] PluginJAR:  at 
java.lang.Class.newInstance0(Class.java:355)
12:04:21 AM [main] [error] PluginJAR:  at 
java.lang.Class.newInstance(Class.java:308)
12:04:21 AM [main] [error] PluginJAR:  at 
org.gjt.sp.jedit.PluginJAR.activatePlugin(PluginJAR.java:735)
12:04:21 AM [main] [error] PluginJAR:  at 
org.gjt.sp.jedit.PluginJAR.activatePluginIfNecessary(PluginJAR.java:823)
12:04:21 AM [main] [error] PluginJAR:  at 
org.gjt.sp.jedit.jEdit.main(jEdit.java:486)
12:04:21 AM [main] [error] PluginJAR: Caused by: 
java.lang.ClassNotFoundException: scala.Serializable
12:04:21 AM [main] [error] PluginJAR:  at 
java.net.URLClassLoader$1.run(URLClassLoader.java:202)
12:04:21 AM [main] [error] PluginJAR:  at 
java.security.AccessController.doPrivileged(Native Method)
12:04:21 AM [main] [error] PluginJAR:  at 
java.net.URLClassLoader.findClass(URLClassLoader.java:190)
12:04:21 AM [main] [error] PluginJAR:  at 
java.lang.ClassLoader.loadClass(ClassLoader.java:306)
12:04:21 AM [main] [error] PluginJAR:  at 
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
12:04:21 AM [main] [error] PluginJAR:  at 
java.lang.ClassLoader.loadClass(ClassLoader.java:247)
12:04:21 AM [main] [error] PluginJAR:  at 
org.gjt.sp.jedit.JARClassLoader.loadFromParent(JARClassLoader.java:522)
12:04:21 AM [main] [error] PluginJAR:  at 
org.gjt.sp.jedit.JARClassLoader.loadClass(JARClassLoader.java:87)
12:04:21 AM [main] [error] PluginJAR:  at 
java.lang.ClassLoader.loadClass(ClassLoader.java:247)
12:04:21 AM [main] [error] PluginJAR:  ... 17 more
12:04:21 AM [main] [error] ErrorListDialog$ErrorEntry: 
/Users/viorel/Work/isabelle-dev/isabelle/src/Tools/jEdit/dist/jars/Isabelle-jEdit.jar:
12:04:21 AM [main] [error] ErrorListDialog$ErrorEntry: Cannot start: 
java.lang.NoClassDefFoundError: scala/Serializable
12:04:21 AM [main] [error] ErrorListDialog$ErrorEntry: Try updating to a 
newer version of the plugin

>
>
> There is some chance though that in more recent latest versions of 
> Isabelle, say 89b13238d7f2, you get another problem if JAVA_HOME does 
> not point to a proper JDK installation -- say the one of the 
> Isabelle2011-1/contrib in the Linux bundle.  Here you need to set 
> JAVA_HOME *outside* of the Isabelle environment or ISABELLE_JDK_HOME 
> *inside* as settings.
>
> I am in the course of refining that again soon ...
Maybe the error from above is related to this comment.

Viorel



More information about the isabelle-dev mailing list