[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [udig-devel] uDig running on 3.4
|
Hi Bas,
There is a bug on OSX Leopard Java 1.5 where you can't run SWT and AWT
widget sets at the same time. If your Java3D makes any AWT widgets
you will have problems. The bug was fixed on later versions of Tiger
Java but not on Leopard. I haven't tried Java 1.6 that Apple ships.
You might also try the BSD based port of Java 1.6 for OSX.
Jesse
On 22-Aug-08, at 6:42 PM, Bas Retsios wrote:
Hello,
I am developing a plug-in for uDig (class MyView extends ViewPart).
In this plug-in, I use Java3D (Canvas3D).
In Windows and Linux I manage to add a perfectly working Canvas3D in
uDig.
However, on MacOS it fails (I tried on OS X 10.5, "Leopard"). I get
a HeadlessException at the Java3D initialization. In particular the
function GraphicsEnvironment.getDefaultScreenDevice() fails, and I
found that this is because the MacOS version of uDig starts with
java.awt.headless=true .
Code examples that work on Windows and Linux, but not on MacOS:
// try 1
{
GraphicsConfiguration configuration =
SimpleUniverse.getPreferredConfiguration(); // throws
HeadlessException
Canvas3D canvas = new Canvas3D(configuration);
}
// try 2
{
GraphicsConfigTemplate3D template = new GraphicsConfigTemplate3D();
GraphicsEnvironment ge =
GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice gd = ge.getDefaultScreenDevice(); // throws
HeadlessException
GraphicsConfiguration[] gc = gd.getConfigurations();
GraphicsConfiguration configuration =
template.getBestConfiguration(gc);
Canvas3D canvas = new Canvas3D(configuration);
}
Is there a solution for this?
Thanks in advance,
Bas.
--
Ir. V. (Bas) Retsios
Software Developer
Geo-information Processing Department
International Institute for Geo-information Science and Earth
Observation (ITC)
P.O. Box 6, 7500 AA Enschede, The Netherlands
Phone +31 (0)53 4874 573, telefax +31 (0)53 4874 335
E-mail retsios@xxxxxx, Internet http://www.itc.nl
International Institute for Geo-Information Science and Earth
Observation (ITC)
Chamber of Commerce: 410 27 560
E-mail disclaimer
The information in this e-mail, including any attachments, is
intended for the addressee only. If you are not the intended
recipient, you are hereby notified that any disclosure, copying,
distribution or action in relation to the content of this
information is strictly prohibited. If you have received this e-mail
by mistake, please delete the message and any attachment and inform
the sender by return e-mail. ITC accepts no liability for any error
or omission in the message content or for damage of any kind that
may arise as a result of e-mail transmission.
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel