What does this error message usually mean for a java program?
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-client to select the "client" VM
-server to select the "server" VM
-hotspot is a synonym for the "client" VM [deprecated]
The default VM is client.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -jre-no-restrict-search
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
Press any key to continue . . .
this is my code:
import java.io.*;
import java.util.*;
public class project2 {
public static void main (String[] args) throws java.io.IOException {
PCB[] Process_Table = new PCB[100];
Queue Ready_Q = new Queue();
Queue Terminated_Q = new Queue();
PCB CPU = null; //this is a pointer
int global_time = 0;
int CPU_time;
//inputStream = new BufferedReader(new FileReader();
do
{
//Scan the input file for processes with arrival_time equal to global_time
try {
BufferedReader in = new BufferedReader(new FileReader("processes2.txt"));
int c;
boolean found = false;
while ((c = in.read()) == global_time) {
found = true;
}
String line = in.readLine();
String[] nProcess = (line.split("\\|"));
boolean isThereNull = false;
for (int i=0;i<Process_Table.length;i++){
if (Process_Table[i]==null){
isThereNull = true;
}//end if
}//end for
if (found == true && isThereNull == true){
PCB processX = new PCB(nProcess); //create new pcb
processX.setStatus('r');
//insert the pcb into the process table
for(int i=0; i<101; i++){
while(Process_Table[i]==null){
processX.setPID(i);
Process_Table[i]=processX;
}
}//end for
//add process to the ready q
Ready_Q.put(processX);
//check if it worked
//System.out.println(Ready_Q.getAll());
}//end if
else{
System.out.println("Process Creation Delayed");
}
}catch (IOException e) {
System.out.println("I/O exception: " + e);
}
}//end do
while(Ready_Q.isEmpty()==false && CPU != null);/*Ready_Q and CPU are not empty*/
}//end main }//end class