I get the following error when trying to run this class file. It seems to compile fine but I just can't get it to run.
Any help would be appreciated.
![]()
This is what the java source file contains:
Also tried:Code:public class HelloJava { public static void main( String[] args ) { System.out.println("Hello, Java!"); } }
Code:import javax.swing.*; public class HelloJava { public static void main( String[] args ) { JFrame frame = new JFrame( "Hello Java!" ); JLabel label = new JLabel("Hello Java!", JLabel.CENTER ); frame.getContentPane( ).add( label ); frame.setSize( 300, 300 ); frame.setVisible( true ); } }




Reply With Quote