AWT PROblem

2000-11-11 Thread Fustini (proxys)

Hi,
I have some problem with Linux RH 6.2 + JRun 3.0+ JDK 1.2.2 SUN.
When i use getToolkit() method in a servlet a error appears  : DISPLAY
value  :0.0 X11 Server not responding.
I Have to know the width and the height of Image in my Webserver.
I installed Jbuilder 4 and when I use it with the getToolkit() function
It works very fine !!!
I configured all X function and my X Desktop works very fine, my DISPLAY
variabile is set to :0. and what else ?

Thanks a lot for all functions


begin:vcard 
n:Alessandro Fustini;Fustini Alex (Proxys NW)
tel;fax:+39+011+4080156
tel;work:+39+011+7208749
x-mozilla-html:TRUE
org:Proxys North West Snc
adr:;;;Collegno (TO);Italy;10097;
version:2.1
email;internet:[EMAIL PROTECTED]
title:Developer
x-mozilla-cpt:;11024
fn:Fustini Alex (Proxys NW) Alessandro Fustini
end:vcard



Re: AWT PROblem

2000-11-11 Thread Alexander V. Konstantinou

Since this is a servlet, I presume it is running on a server.  It is very
likely that X11 is not running on the server.  Even if it is, any decently
configured HTTP server will not execute servlets as a regular user, but
some special user like nobody.  In that case, even if the AWT system
knew the right display (:0.0) it would not be allowed to connect to it.
It does seem like Sun made a design error if you need to initialize AWT
in order to read an image's hight and width.  You might be tempted to use
xhost to allow all users access to the local X11 console, but I would not
recommend that !  Other alternatives include using JNI or invoking a 
program that will print the size of the image (very inefficient, but I
I guess you could cache the results).  You could also look for third
party native libraries that allow you to access meta-info about popular
image type (gif, pgn, jpg, ...)

Alexander

On Sat, Nov 11, 2000 at 09:07:00AM +0100, Fustini (proxys) wrote:
> Hi,
> I have some problem with Linux RH 6.2 + JRun 3.0+ JDK 1.2.2 SUN.
> When i use getToolkit() method in a servlet a error appears  : DISPLAY
> value  :0.0 X11 Server not responding.
> I Have to know the width and the height of Image in my Webserver.
> I installed Jbuilder 4 and when I use it with the getToolkit() function
> It works very fine !!!
> I configured all X function and my X Desktop works very fine, my DISPLAY
> variabile is set to :0. and what else ?
> 
> Thanks a lot for all functions

Content-Description: Card for Fustini (proxys)


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: AWT PROblem

2000-11-11 Thread Nathan Meyers

"Fustini (proxys)" wrote:

> Hi,
> I have some problem with Linux RH 6.2 + JRun 3.0+ JDK 1.2.2 SUN.
> When i use getToolkit() method in a servlet a error appears  : DISPLAY
> value  :0.0 X11 Server not responding.
> I Have to know the width and the height of Image in my Webserver.
> I installed Jbuilder 4 and when I use it with the getToolkit() function
> It works very fine !!!
> I configured all X function and my X Desktop works very fine, my DISPLAY
> variabile is set to :0. and what else ?

It is a "feature" of the AWT that using any AWT classes - even those that
do not have a GUI - requires that you run an X Window System server. This
server needs to run somewhere the servlet engine can find it. This isn't
happening right now - you are running an X server on your workstation, but
probably not on the server hosting the servlets.

The usual solution is to run the Xvfb server (an X server that does not
require display hardware) on the same host running the servlets.

Nathan

>
>
> Thanks a lot for all functions


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: AWT PROblem

2000-11-11 Thread Joi Ellis



On Sat, 11 Nov 2000, Fustini (proxys) wrote:

> Hi,
> I have some problem with Linux RH 6.2 + JRun 3.0+ JDK 1.2.2 SUN.
> When i use getToolkit() method in a servlet a error appears  : DISPLAY
> value  :0.0 X11 Server not responding.

Change your DISPLAY variable to provide a host name.  Java doesn't try to
figure out what host name it should use by default when it sees ":0.0"
intead of "host:0.0".



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: java developer feedback

2000-11-11 Thread Ron Yorston

Joi Ellis wrote:
>On Fri, 10 Nov 2000, Calvin Austin wrote:
>
>> In moving forward I would be very interested in areas that
>> you believe Blackdown and Sun should focus on, in particular
>> what do you plan to use the linux port for, whether its as
>> a development machine or rolling out into production. What
>> would help you become more productive. Which bugs, like
>> the international keyboard bug are causing problems for you.
>
>I use Linux as my development platform for a cross-platform GUI.
>The GUI itself is aimed at Linux, Solaris, and Windows platforms
>(in that order.)
>
>I'm also active on Borland's newsgroups.  The most common issues
>I see new Linux users asking for help with there is (in no particular
>order):
>
>  Incompatible window managers
>Java apps misbehave on FVWM2 and others.  Apparently there are
>KDE support hacks hardwired into the JVM?  One common problem
>involves window positioning and size errors.  (General X11 apps
>don't care which window manager they run under.  Why must Java?)

I'll second that.

But, /pace/ Joi, it's not the window managers that are incompatible with
Java, it's Java that's incompatible with Unix window managers.

Apparently ((C) Bel Littlejohn), Sun, in their infinite wisdom, decided that
compatibility with legacy Microsoft operating systems was more important than
compatibility with any number of Unix window managers.  (Why does 'birthright'
and 'mess of potage' spring to mind?)

I live in hope that one day someone far enough up the food chain at Sun will
admit that Bug Id 4102292 is a /BUG/ and not a 'request for enhancement'.

To address Calvin's question:  we've recently ported our main product to 
Linux.  It was developed on Solaris (SunOS, in those days) with Motif.
We've had a lot of interest in the Linux version.

I'd love to be able to add features to it using Java:  we support Solaris,
AIX and Linux, so cross-platform-ness is important.  But when our technical
director asks (of a Java application) 'Why does the window appear in the
wrong place?', it demotivates me somewhat.  Until Java works with arbitrary
Unix window managers I won't be pushing to write any applications in Java.

Java is a brilliant language, but it's let down by its implementation.

Ron

--
What's so fucking good, what's so fucking good about candy?  -- PWEI


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: java developer feedback

2000-11-11 Thread Calvin Austin



That particular (4102292) bug has been partially fixed in linux 1.3, the 
window manager decides where the frame will go for the window managers I tried
sawfish, kwm etc and it will be placed as the window manager decides and
not stuck at 0,0 or worse -x, -y. That fix will also go into the 1.3.1 master 
source tree, ie it should work for Solaris too. I can check on that.

However it doesn't address the fundamental design issue that on Unix we
want to find out what the window manager did to our frame, One of the primary
reasons was to find out the size of the frame decorations (a chicken and
egg problem, how do you know what size the frame is without the window manager
displaying it?). And the main reason the original designers want to know the 
frame size, so they could  work out the origin of the canvas because they
thought that windows only had the origin inside the frame decoration. That
was a wrong assumption but introduce the insets concept :*(

regards
calvin



>I'll second that.
>
>But, /pace/ Joi, it's not the window managers that are incompatible with
>Java, it's Java that's incompatible with Unix window managers.
>
>Apparently ((C) Bel Littlejohn), Sun, in their infinite wisdom, decided that
>compatibility with legacy Microsoft operating systems was more important than
>compatibility with any number of Unix window managers.  (Why does 'birthright'
>and 'mess of potage' spring to mind?)
>
>I live in hope that one day someone far enough up the food chain at Sun will
>admit that Bug Id 4102292 is a /BUG/ and not a 'request for enhancement'.
>
>To address Calvin's question:  we've recently ported our main product to 
>Linux.  It was developed on Solaris (SunOS, in those days) with Motif.
>We've had a lot of interest in the Linux version.
>
>I'd love to be able to add features to it using Java:  we support Solaris,
>AIX and Linux, so cross-platform-ness is important.  But when our technical
>director asks (of a Java application) 'Why does the window appear in the
>wrong place?', it demotivates me somewhat.  Until Java works with arbitrary
>Unix window managers I won't be pushing to write any applications in Java.
>
>Java is a brilliant language, but it's let down by its implementation.
>
>Ron
>
>--
>What's so fucking good, what's so fucking good about candy?  -- PWEI



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]