I have the following code, I compile it on one machine and produce the class file. I then take the class to another computer running xp. The machine has had no java compiler etc installed on it, it just comes with whatever windows installs by default. I have not set up class paths etc as i presume this will be done already by windows. I type java in at the command prompt and it gives me all the info relating to the jvm...
The code is as follows:
public class panasert1
public static String x;
public static String y;
public static String w;
public static String v;
public static Scanner data_input = new Scanner(System.in);
public static void convert(String source, String destination)
// Create new file
write_out = new PrintStream(new File(destination));
read_in = new Scanner(new File(source));
// read in one line at a time
// read in record
record = new String(read_in.next());
line = new Scanner(record);
x = line.next();
y = line.next();
v = line.next();
w = line.next();
// Increment record count
// Output a record
// Close file
catch (FileNotFoundException e)
public static void main(String args)
System.out.println("Enter the source file name in full");
sourceFilename = new String(data_input.next());
System.out.println("Enter the destination file name in full");
destinationFilename = new String(data_input.next());
When i put the class file in the my documents and type: java panasert1 it just says exception in thread main etc and a list of other details..
i really want it to run on a windows 98 machine in the future though, but need to get it to run on xp first..
Can anyone help?