[kepler-dev] Problem starting Vergil and Ptplot on the Mac under Eclipse
Christopher Brooks
cxh at eecs.berkeley.edu
Wed Sep 24 18:52:28 PDT 2008
Hauke Fuhrmann wrote:
> Christopher,
>
> for now we are developing all KIELER stuff with "the latest and
> greatest" Java 1.6 as you would say.
>
> Reinhard plans to switch to a Mac. You said there are certain issues
> with Java 1.6 on a Mac. Can you point us out to them so we can judge if
> we can either live with the Java bugs (maybe features we don't use?) or
> if we need to go back to Java 1.5 with Kieler?
>
> Cheers,
> Hauke
Hi Hauke,
I changed the subject and cc'd Kepler-dev because this is probably of
interest to Kepler as well.
Check out
http://chess.eecs.berkeley.edu/ptexternal/wiki/Main/Mac#Eclipse1_6
I was not able to run Eclipse with Java 1.6.0_05 on the Mac.
I got a stack trace, which is on the above wiki.
If I start Eclipse with Java 1.5.0_13, then the .classpath corresponding
with the project cannot have
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
in it.
I modified ptII/configure so that it no longer includes the above
line in ptII/.classpath. This means that Thomas Feng's backtracking
facility _does_not_ work under Mac OS from within Eclipse. It might
work from the command line though. Also, I can't run my test code
in ptolemy/apps/eclipse/awt on the Mac in Eclipse from within the ptII
project.
I think the problem is restricted to Eclipse Java projects that also
have plug-ins within them. We were able to run pure plug-ins just fine.
Note that I had different error messages with Java 1.5.0_13 and
1.6.0_05. I was able to replicate the initial problem I had with Java
1.5.0_13 with a small piece of sample code that uses a HTML widget.
I was also able to replicate it by trying to run just the plotter.
So, bottom line:
- Eclipse 3.4.0 will not start up for me under Java 1.6.0_05 on the Mac.
This means that if "java -version" returns 1.6.0_05, then Eclipse
failed to start for me.
- Within Eclipse 3.4.0 which was started with Java 1.5.0_13, you can
compile and run your project with either Java 1.5.0_13 or
Java 1.6.0_13.
- Eclipse 3.4.0 Java Projects that include Eclipse Plug-ins don't work
under either Java 1.5.0_13 or Java 1.6.0_05 on the Mac.
Let me know if anyone is able to:
1) Start Eclipse using Java 1.6 under Mac OS X
2) Build and run the backtracking code under Mac OS X
_Christopher
> Executive Summary
> =================
> The problem is that starting Vergil or Ptplot on the Mac under
> Eclipse fails.
>
> The temporary solution is to update your tree and do
> cp ~/.classpath.default .classpath
> and then refresh Eclipse.
>
> The change I made was that I removed
> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
> from .classpath.default.
>
> This means that the backtracking facility will not work and that
> running ./configure on the Mac will produce a configuration that will
> not work in Eclipse.
>
> Maybe I can get together with Thomas and work on getting backtracking
> to work under Eclipse.
>
> Details
> =======
>
> Running Eclipse 3.4.0 with Java 1.5.0_13, I get a stack trace involving
> HTMLViewer
> [Get Code]
> java.lang.NullPointerException
> at java.util.Hashtable.put(Hashtable.java:396)
> at
> javax.swing.JEditorPane.registerEditorKitForContentType(JEditorPane.java:1150)
> ...
> at javax.swing.JEditorPane.setContentType(JEditorPane.java:884)
> at ptolemy.actor.gui.HTMLViewer._init(HTMLViewer.java:448)
>
> This error does not occur when running from the command line.
>
> A workaround is to use Java 1.6.0_05. However, then the splash screen
> comes up and hangs.
>
> * It looks like the main thread quickly exits
> * I tried using .classpath.default by copying that file to
> .classpath
> * Running ptolemy.plot.moml.EditablePlotMLApplication has similar
> problems
> * If I replace invokeLater() with invokeAndWait() then I get a grey
> box and see this
>
> 2008-09-12 17:13:17.988 java[19705:17003] *** -[NSConditionLock unlock]:
> lock (<NSConditionLock: 0x122429bd0> '(null)') unlocked when not locked
> 2008-09-12 17:13:17.989 java[19705:17003] *** Break on _NSLockError() to
> debug.
>
> I see the above for both VergilApplication and
> EditablePlotMLApplication if I use invokeAndWait()
>
> * Interestingly, creating a project from the PtPlot5.7 sources works
> fine - the binary runs.
> * So, the problem is that if the Eclipse .classpath has
>
> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
>
> then I get the hanging problem
>
> So, the solution is to not include the plugins. However, this means
> that the backtrack directory should also be excluded.
>
Hauke Fuhrmann wrote:
> Christopher,
>
> for now we are developing all KIELER stuff with "the latest and
> greatest" Java 1.6 as you would say.
>
> Reinhard plans to switch to a Mac. You said there are certain issues
> with Java 1.6 on a Mac. Can you point us out to them so we can judge if
> we can either live with the Java bugs (maybe features we don't use?) or
> if we need to go back to Java 1.5 with Kieler?
>
> Cheers,
> Hauke
--
Christopher Brooks (cxh at eecs berkeley edu) University of California
Chess Executive Director US Mail: 337 Cory Hall
Programmer/Analyst Chess/Ptolemy/Trust Berkeley, CA 94720-1774
ph: 510.643.9841 fax: 510.642.2718 (office: 545Q Cory)
home: (F-Tu) 707.665.0131 (W-F) 510.655.5480
More information about the Kepler-dev
mailing list