When I run the following application in Solaris 2.6 It throws an
exception.
But the same application works perfect on a Solaris 2.5.
The application was compiled with JDK 1.3 and uses AWT. It throws the
exception
when I try to show the frame.
I am using the following line to start the application
java -classpath $JAVA_HOME/lib/classes.zip:. Junk
What is Going on?
Thank
Al
java.lang.UnsatisfiedLinkError: no awt in shared library path
at java.lang.Runtime.loadLibrary(Runtime.java)
at java.lang.System.loadLibrary(System.java)
at
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:244)
at java.awt.Window.getToolkit(Window.java:197)
at java.awt.Frame.addNotify(Frame.java:139)
at java.awt.Window.show(Window.java:130)
at Junk.main(Junk.java:14)
//
// SOURCE CODE
//
import java.util.*;
import java.io.*;
import java.awt.*;
import java.awt.event.*;
class Junk extends Frame implements ActionListener {
public static void main ( String[] argv ) throws Exception {
Junk frame = new Junk();
frame.setSize( 500, 75 );
System.out.println( "Before frame.show" );
frame.show();
System.out.println( "After frame.show" );
}
Junk() {
super( "Configure app.conf" );
Button button = new Button( "Exit" );
button.setActionCommand( "Exit" );
button.addActionListener( this );
add( button );
}
public void actionPerformed( ActionEvent event ) {
String dialogName = (String) event.getActionCommand();
if ( dialogName.equals("Exit") ) {
System.out.println( "Exit button Pressed" );
System.exit( 0 );
}
}
}