Quote (Foloed @ Oct 28 2012 12:10am)
Okay, i have isolated my problem.. Reading the file incorrectly.
filePathInput = keyboard.next();
File lol = new File (filePathInput);
scanner readFromFile = new Scanner (lol);
Not sure how to fix. I know that it is the stupid inputted file path input though. Do i need to add quotations to file path input?
add some friggin logging dude
Code
filePathInput = keyboard.next();
log.debug("filePathInput=" + filePathInput);
File lol = new File (filePathInput);
log.debug("file exists: " + lol.exists());
scanner readFromFile = new Scanner (lol);
log.debug("about to start WHILE");
while (readFromFile.hasNext() )
{
log.debug("WHILE started");
x = readFromFile.nextLine();
log.debug("x=" + x);
y = readFromFile.nextInt();
log.debug("y=" + y);
z = readFromFile.nextDouble();
log.debug("z=" + z);
}
log.debug("loop done");
then show me your log file. this is something you should be doing on your own. instead you need to post 4+ times to get all the information.
i'm guessing there's a space when the user types the file path, and keyboard.next() cuts it off
This post was edited by carteblanche on Oct 27 2012 10:17pm