When you run in in cmd, it won't display because it's not in an applet environment. It doesn't have anything to display to. In order for it to work, you need to create your own display, aka a JFrame. Try this code:
public static void main(String args[]){
File file=.....;
final GraphMain applet=new GraphMain(file);
applet.init();
JFrame f=new JFrame("Title goes here");
f.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
f.addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent e){
applet.stop();
applet.destroy();
System.exit(0);
}
});
f.setLayout(new BorderLayout());
f.add(applet, BorderLayoyt.CENTER);
f.setSize(whatever size your applet is);
applet.start();
f.setVisible(true);
}
I'm not guaranteeing this code to be bug free (I just wrote it in my browser right now) but you can use it as a starting point.
Also, because you are using File
you will need to sign your jar for it to work. See the Oracle tutorial here: http://docs.oracle.com/javase/tutorial/deployment/jar/signindex.html