Name: jbT81659 Date: 10/15/2000
Under Win95 applications and applets fail to be initilized, and the following exception
is thrown:
---------------------
F:\MerlinNew\JDK1.4\QuickLook>java jRadioButton
Exception in thread "main" java.lang.Error: can't load javax.swing.plaf.metal.Me
talLookAndFeel
at javax.swing.UIManager.initializeDefaultLAF(Unknown Source)
at javax.swing.UIManager.initialize(Unknown Source)
at javax.swing.UIManager.maybeInitialize(Unknown Source)
at javax.swing.UIManager.getUI(Unknown Source)
at javax.swing.JPanel.updateUI(Unknown Source)
at javax.swing.JPanel.<init>(Unknown Source)
at javax.swing.JPanel.<init>(Unknown Source)
at javax.swing.JRootPane.createGlassPane(Unknown Source)
at javax.swing.JRootPane.<init>(Unknown Source)
at javax.swing.JFrame.createRootPane(Unknown Source)
at javax.swing.JFrame.frameInit(Unknown Source)
at javax.swing.JFrame.<init>(Unknown Source)
at jRadioButton.main(jRadioButton.java:25)
---------------------
To reproduce bug, Run the following code or any application or applet under Win95 English, using
Merlin Beta36.
--------Code-------------
/* Copyright (c) Sun Microsystems 1998
$Header: /home/sun/src/JDK1.4/java/jButton.java,v 1.1.1.1 2000/04/09 06:12:41 benavrhm Exp $
*/
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class jButton extends JApplet
{
public void init()
{
jButton1 button = new jButton1();
getContentPane().add(button);
}
public static void main(String[] argv)
{
JFrame frame = new JFrame("\u0645\u062b\u0627\u0644");
frame.setContentPane(new jButton1());
frame.pack();
frame.setVisible(true);
frame.addWindowListener( new WindowAdapter()
{
public void windowClosing( WindowEvent e)
{
System.exit(0);
}
});
}
}
class jButton1 extends JPanel
{
JButton Button1;
JButton Button2;
JButton Button3;
JButton Button4;
JButton Button5;
JButton Button6;
JButton Button7;
JButton Button8;
JButton Button9;
JButton Button10;
JButton Button11;
JButton Button12;
JButton Button13;
JButton Button14;
public jButton1()
{
this.setLayout(new GridLayout(15,1));
Button1= new JButton("\u0043\u002b\u002b\u0020\u05d3\u05d5\u05e8\u05e9\u0020\u05d6\u05de\u05df\u0020\u05dc\u05d9\u05de\u05d5\u05d3\u0020\u05de\u05de\u05d5\u05e9\u05da");
String f1 = Button1.getFont().getName();
System.out.println("Font used in Button1 is "+ f1 );
Button1.setFont(new Font("Lucida Sans Regular",Font.PLAIN,16));
add(Button1);
Button2 = new JButton("\u0043\u002b\u002b\u0020\u064a\u062d\u062a\u0627\u062c\u0020\u0648\u0642\u062a\u0627\u0020\u0637\u0648\u064a\u0644\u0627\u0020\u0644\u0644\u062a\u0639\u0644\u0645");
String f2 = Button2.getFont().getName();
System.out.println("Font used in Button2 is "+ f2 );
Button2.setFont(new Font("Lucida Sans Regular",Font.PLAIN,16));
add(Button2);
Button3 = new JButton("\u05d6\u05d5\u0020\u05e9\u05e0\u05d4\u0020\u05d9\u05e4\u05d4");
String f3 = Button3.getFont().getName();
System.out.println("Font used in Button3 is "+ f3 );
Button3.setFont(new Font("Lucida Sans Regular",Font.PLAIN,16));
add(Button3);
Button4 = new JButton("\u05ea\u05e4\u05d5\u05d6\u05d9\u05dd\u0020\u05d8\u05e2\u05de\u05d9\u05dd\u0020\u006c\u0069\u006d\u0065\u0020\u0069\u0073\u0020\u0067\u0072\u0065\u0065\u006e");
String f4 = Button4.getFont().getName();
System.out.println("Font used in Button4 is "+ f4 );
Button4.setFont(new Font("Lucida Sans Regular",Font.PLAIN,28));
add(Button4);
Button5 = new JButton("\u006c\u0069\u006d\u0065\u0020\u0069\u0073\u0020\u0067\u0072\u0065\u0065\u006e\u05d7\u05d5\u05de\u05d5\u05e1\u0020\u05d9\u05e7\u05e8");
String f5 = Button5.getFont().getName();
System.out.println("Font used in Button5 is "+ f5 );
Button5.setFont(new Font("Lucida Sans Regular",Font.PLAIN,18));
add(Button5);
Button6 = new JButton("\u006c\u0069\u006d\u0065\u0020\u05d7\u05d5\u05de\u05d5\u05e1\u0020\u05d9\u05e7\u05e8\u0069\u0073\u0020\u0067\u0072\u0065\u0065\u006e");
String f6 = Button6.getFont().getName();
System.out.println("Font used in Button6 is "+ f6 );
Button6.setFont(new Font("Lucida Sans Regular",Font.PLAIN,18));
add(Button6);
Button7 = new JButton("\u05d7\u05d5\u05de\u05d5\u05e1\u0020\u006c\u0069\u006d\u0065\u0020\u0069\u0073\u0020\u0067\u0072\u0065\u0065\u006e\u0020\u05d9\u05e7\u05e8");
String f7 = Button7.getFont().getName();
System.out.println("Font used in Button7 is "+ f7 );
Button7.setFont(new Font("Lucida Sans Regular",Font.PLAIN,18));
add(Button7);
Button8 = new JButton("\u062a\u0641\u0627\u062d\u0020\u0623\u062d\u0645\u0631\u0020\u0643\u0628\u064a\u0631");
String f8 = Button8.getFont().getName();
System.out.println("Font used in Button8 is "+ f8 );
Button8.setFont(new Font("Lucida Sans Regular",Font.PLAIN,18));
add(Button8);
Button9 = new JButton("\u0648\u0644\u062f\u0020\u0635\u063a\u064a\u0631\u0020\u006c\u0069\u006d\u0065\u0020\u0069\u0073\u0020\u0067\u0072\u0065\u0065\u006e\u0020\u0648\u062c\u0645\u064a\u0644");
String f9 = Button9.getFont().getName();
System.out.println("Font used in Button9 is "+ f9 );
Button9.setFont(new Font("Lucida Sans Regular",Font.PLAIN,18));
add(Button9);
Button10 = new JButton("\u0647\u0630\u0627\u0020\u05d6\u05d4\u0020\u05d9\u05d5\u05dd\u0020\u05e0\u05e2\u05d9\u05dd\u0020\u064a\u0648\u0645\u0020\u0644\u0637\u064a\u0641");
String f10 = Button10.getFont().getName();
System.out.println("Font used in Button10 is "+ f10 );
Button10.setFont(new Font("Lucida Sans Regular",Font.PLAIN,18));
add(Button10);
Button11 = new JButton("\u0647\u0630\u0647\u0020\u0633\u0646\u0629\u0020\u0661\u0669\u0665\u0668\u0020\u0031\u0039\u0035\u0038");
String f11 = Button11.getFont().getName();
System.out.println("Font used in Button11 is "+ f11 );
Button11.setFont(new Font("Lucida Sans Regular",Font.PLAIN,18));
add(Button11);
Button12 = new JButton("\u05d6\u05d4\u0020\u05d9\u05d5\u05dd\u0020\u0648\u0644\u062f\u0020\u0635\u063a\u064a\u0631\u0020\u0648\u062c\u0645\u064a\u0644\u0020\u05e0\u05e2\u05d9\u05dd");
String f12 = Button12.getFont().getName();
System.out.println("Font used in Button12 is "+ f12 );
Button12.setFont(new Font("Lucida Sans Regular",Font.PLAIN,18));
add(Button12);
}
}
-------------------------
More info on this bug:
----------------------
This happens only if the build is installed in the machine. If the entire directory structure is copied from /usr/local/.../bundles/..., to the machine, then everything works okay. So this could be something to do with the build installer.
WorkAround:
======================================================================
- duplicates
-
JDK-4379553 merlinb36-Plugin Not loading properly, not able to load plugin enabled pages
- Closed
-
JDK-4384041 JDK1.4.0b38, Java fails under windows2000
- Closed