Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: permission error using Color class




On 31 Dec 2004, at 3:40 PM, nc wrote:

Greg and Stephen,
Thank you for your quick help. It works if I run the application as follows;
java -Djava.awt.headless=true genGridNew
The link below was very helpful..
In case someone else has similar problem, I connect to mac using ssh from my Linux (redhat9) box. I set the display correctly (export DISPLAY=...0.0 using bash shell) and run xhost from my local box. I run some other graphical utilities so I am sure that the display was set up correctly.

The DISPLAY is only used for X11 applications such as xterm, xclock, etc. On the Mac, java does *not* use X11. It uses the native Aqua graphics, so no matter what you do to the DISPLAY it will not help. It is not possible to run Aqua applications remotely.


I believe NeXT had a way of running applications remotely, but Mac OS X does not (yet?)

If I go to a different machine (windows box) and ssh to my linux box and run this application, it runs fine. I don't even have to play with the display settings. It is only a problem if I run it on mac.

On Linux, java uses X11 for graphics, so in this case it works. You do not need to play with the display settings because you used the "-X" option on ssh, which takes care of everything for you.


I am not sure what "headles" session means in this context but I will keep reading the link below. For now it works with "-Djava.awt.headless=true".

The term "head" comes from
"Head" means a display. A "headless" server has no display connected. By specifying "-Djava.awt.headless=true" you are telling java that you are not doing anything that requires a display.


So it does not try to initialise the graphics, and therefore works.

--
Rohan Lloyd

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: permission error using Color class (From: Greg Guerin <email@hidden>)
 >Re: permission error using Color class (From: nc <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.