Definition at line 36 of file g4vrmlview.java.
static void g4vrmlview.main |
( |
String[] |
args | ) |
|
|
inlinestatic |
Definition at line 38 of file g4vrmlview.java.
42 final String VERSION =
"1.00" ;
43 final String DATE =
"August 19, 1997";
45 final int PORT_NO = 40801 ;
46 final String OUTPUT_FILE_HEAD =
"g4" ;
47 final String OUTPUT_FILE_EXT =
"wrl" ;
48 final int MAX_TRIAL = 10 ;
51 int portNo = PORT_NO ;
54 if( args.length != 1 && args.length != 2 )
56 System.out.println(
"-------------------------------");
57 System.out.println(
" G4VRMLView version " + VERSION );
58 System.out.println(
" " + DATE );
59 System.out.println(
"-------------------------------");
60 System.out.println(
"Usage: java g4vrmlview browser_name [port_number]");
61 System.out.println(
" Browser_name: netscape, vrweb, etc, or NONE");
66 String browser =
new String ( args[0] ) ;
69 if( args.length == 2 )
71 portNo = Integer.parseInt( args[1] );
75 ServerSocket ss = null ;
76 for (
int i = 0 ; i < MAX_TRIAL ; i++ )
80 ss =
new ServerSocket( portNo );
81 System.out.println(
"Waiting for requests at port " +portNo +
" ...");
89 System.out.println(
"Sockets are not available.");
100 Socket socket = ss.accept(); nSpawn++ ;
102 System.out.println(
"Connection accepted by thread " + nSpawn );
104 (
new g4vrmlviewThread( socket, OUTPUT_FILE_HEAD, OUTPUT_FILE_EXT , browser )).start() ;
109 catch ( Exception e )
111 System.out.println( e.toString() );
The documentation for this class was generated from the following file:
- source/geant4.10.03.p03/source/visualization/VRML/g4vrmlview/g4vrmlview.java