Cheers,
I followed your instructions. But when i go to compile and run i get an error msg...
java.lang.NoSuchMethodError: main
Exception in thread "main"
My main class was static as well but it produce another message cause my new class wasn't anymore could this by related?
Not sure if it was easier to show you my code or not, so i've just gone for it...
public class Test {
public void main(String[] args) throws IOException {
File output = new File("N:/output.txt"

;
FileWriter out = new FileWriter(output);
BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(new File("N:/Printer.txt"

)));
String line = "";
int tokenid = 0;
int id = 0;
String date = "";
String username = "";
String printer = "";
String document = "";
String pages = "";
List array = new ArrayList();
PrintingRecord myrecord = new PrintingRecord(id,date,username,printer,document,pages);
myrecord.id = 0;
while((line= reader.readLine()) != null) { //Keep on reading in lines until EOF
System.out.println(line); //reading in all lines ok
StringTokenizer st = new StringTokenizer(line, ",;:"

;
String token;
tokenid = 0;
myrecord.id++;
while(st.hasMoreTokens()){ //while there are still tokens to read
out.flush();
token = st.nextToken();
out.write(token); //output token to file
out.write('\n');
//assign variables to tokens
if (tokenid == 0){
myrecord.date= token;
}
if (tokenid == 8){
myrecord.username = token;
}
if (tokenid == 11){
myrecord.printer = token;
}
if (tokenid == 13){
myrecord.pages = token;
}
tokenid++;
}
System.out.println("Date " + myrecord.date + "Token ID is " + tokenid);
System.out.println("Username " + myrecord.username + "Token ID is " + tokenid);
System.out.println("Printer " + myrecord.printer + "Token ID is " + tokenid);
System.out.println("RecordID is " + myrecord.id);
//Send tokens and myrecord.id to an array
array.add(myrecord);
}
System.out.println("Array is holding: " + myrecord);
out.close();
}
public class PrintingRecord {
public PrintingRecord(int id_, String date_, String username_, String printer_, String document_, String pages_){
id = id_;
username = username_;
printer = printer_;
document = document_;
pages = pages_;
}
public int id =0;
public String date;
public String username;
public String printer;
public String document;
public String pages;
}
}