Operating System - HP-UX
1832279 Members
1970 Online
110041 Solutions
New Discussion

Re: /usr/bin/X11/X :5 (Xvfb) Does not work with Java/Hotspot 1.3.1

 
Jesus Francisco
Occasional Contributor

/usr/bin/X11/X :5 (Xvfb) Does not work with Java/Hotspot 1.3.1

 
5 REPLIES 5
Jesus Francisco
Occasional Contributor

Re: /usr/bin/X11/X :5 (Xvfb) Does not work with Java/Hotspot 1.3.1

We are trying to test this code using (Xvfb):

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.colorchooser.*;

public class ColorChooserDemo extends JFrame {
public ColorChooserDemo() {
super("ColorChooserDemo");

//Set up the banner at the top of the window
final JLabel banner = new JLabel("Welcome to the Tutorial Zone!",
JLabel.CENTER);
banner.setForeground(Color.yellow);
banner.setBackground(Color.blue);
banner.setOpaque(true);
banner.setFont(new Font("SansSerif", Font.BOLD, 24));
banner.setPreferredSize(new Dimension(100, 65));

JPanel bannerPanel = new JPanel(new BorderLayout());
bannerPanel.add(banner, BorderLayout.CENTER);
bannerPanel.setBorder(BorderFactory.createTitledBorder("Banner"));

//Set up color chooser for setting text color
final JColorChooser tcc = new JColorChooser(banner.getForeground());
tcc.getSelectionModel().addChangeListener(
new ChangeListener() {
public void stateChanged(ChangeEvent e) {
Color newColor = tcc.getColor();
banner.setForeground(newColor);
}
}
);
tcc.setBorder(BorderFactory.createTitledBorder(
"Choose Text Color"));

//Add the components to the demo frame
Container contentPane = getContentPane();
contentPane.add(bannerPanel, BorderLayout.CENTER);
contentPane.add(tcc, BorderLayout.SOUTH);
}

public static void main(String[] args) {
JFrame frame = new ColorChooserDemo();
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {System.exit(0);}
});

frame.pack();
frame.setVisible(true);
}
}
Jesus Francisco
Occasional Contributor

Re: /usr/bin/X11/X :5 (Xvfb) Does not work with Java/Hotspot 1.3.1

 
Alex Glennie
Honored Contributor

Re: /usr/bin/X11/X :5 (Xvfb) Does not work with Java/Hotspot 1.3.1

Guys,

I have found that using LANG set to en_US.utf8 the error shows but if we use LANG set to
en_US.iso88591 or unset it works fine.

So we are closer to the FIX.

If you have any ideas you can post them here:

OK Could we try to eliminate fonts from the equation as it's the only thing I can think that may also be affected by a change in locales/langs.

Have you access to an hpux system with CDE installed : if yes setup xfs on this system, include the CDE dt-inerface fonts in the catalog.

Once that's running start Xvfb as normal but before running your java app,

try export DISPLAY=:5
xset +fp tcp/ip_address:7000 where the ip_address is that of the fontserver.

Also detail what systems are involved here ie what h/w and O/S is on the system running Xvfb and similarly where does the java app run ?

I'll post you details on how to set up xfs soon

Lastly do you have s/w support with HP we could look at this more closely if you do ?
Keith Hughes_1
New Member

Re: /usr/bin/X11/X :5 (Xvfb) Does not work with Java/Hotspot 1.3.1

Hi,

I am sorry to bring you bad news but I am affraid that the locale that you are trying to use is not supported.

For A full list of supported locales, please check the release notes for Java C.1.3.1 at /opt/java1.3/java.os11.release.notes

Keith
Keith Hughes_1
New Member

Re: /usr/bin/X11/X :5 (Xvfb) Does not work with Java/Hotspot 1.3.1

Hi,

Why do you require to use the locale en_US.utf8. Is it required for Java.

If you do not need to use this locale for your Java Application then I would recommend that you set LANG=en_US.iso88591 and then reset it to en_US.utf8 when the java application is up and running correctly. You will need to do this each time you run your application.

I hope that this helps you.

Keith