Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

does anybody know how to run java in windows and linux ?

0 views
Skip to first unread message

DAVID

unread,
Sep 27, 2000, 11:27:13 PM9/27/00
to
dear all:

Java program is a cross paltform language ,but i try a program to test
it , i can run pract4.java
in windows2000, it run very fine. but when i move it to redhat 6.2 linux ,it
can't run it on x-window
but i can compile it without any problem ,it show some message ,does anybody
know how to run java in windows and linux ?

david regard.

***********************************************************
my program pract4.java
***********************************************************
import javax.swing.*;
public class pract4{
public static void main(String args[]){
int n=Integer.parseInt(JOptionPane.showInputDialog("please input
integer"));
double s=0;
System.out.println("n="+n);
for(int i=0;i<n;i++){
int b=i+1;
System.out.println("b="+b);
System.out.println("i="+i);
double d1=(double)1/(double)b;
s=s+d1;
System.out.println("s="+s);
}
System.out.println("s="+s);
System.exit(0);
}
}
***********************************************************
error message in linux
***********************************************************

Exception in thread "main" java.lang.Error:
can't load
javax.swing.plaf.metal.MetalLookAndFeel

at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:852)

at javax.swing.UIManager.initialize(UIManager.java:922)

at javax.swing.UIManager.maybeInitialize(UIManager.java:944)

at javax.swing.UIManager.getUI(UIManager.java:555)

at javax.swing.JOptionPane.updateUI(JOptionPane.java:1314)

at javax.swing.JOptionPane.<init>(JOptionPane.java:1277)

at javax.swing.JOptionPane.showInputDialog(JOptionPane.java:423)

at javax.swing.JOptionPane.showInputDialog(JOptionPane.java:392)

at javax.swing.JOptionPane.showInputDialog(JOptionPane.java:375)

at javax.swing.JOptionPane.showInputDialog(JOptionPane.java:363)

at pract4.main(pract4.java:4)


Font specified in font.properties not found
[--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found
[--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found
[--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found
[--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found
[--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found
[--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found
[--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found
[--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found
[--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found
[--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found
[--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found
[--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found
[--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found
[--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found
[--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found
[--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]

Font specified in font.properties not found
[--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
Font specified in font.properties not found
[--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
Font specified in font.properties not found
[--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
Exception in thread "main" java.lang.Error: can't load
javax.swing.plaf.metal.MetalLookAndFeel
at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:852)
at javax.swing.UIManager.initialize(UIManager.java:922)
at javax.swing.UIManager.maybeInitialize(UIManager.java:944)
at javax.swing.UIManager.getUI(UIManager.java:555)
at javax.swing.JOptionPane.updateUI(JOptionPane.java:1314)
at javax.swing.JOptionPane.<init>(JOptionPane.java:1277)
at javax.swing.JOptionPane.showInputDialog(JOptionPane.java:423)
at javax.swing.JOptionPane.showInputDialog(JOptionPane.java:392)
at javax.swing.JOptionPane.showInputDialog(JOptionPane.java:375)

at javax.swing.JOptionPane.showInputDialog(JOptionPane.java:363)

at pract4.main(pract4.java:4)

0 new messages