android - Cannot import csv file to JAVA -
i met problem when trying import csv file java code, here related java code
try { file file = new file("/home/hanrui/workspace/table.csv"); bufferedreader reader = new bufferedreader(new filereader(file)); reader.readline(); string line = null; while((line=reader.readline())!=null){ string item[] = line.split(","); string last = item[item.length-1]; int value = integer.parseint(last); series1numbers[row] = value; series2numbers[row] = value; row++; } } catch (filenotfoundexception e) { // todo auto-generated catch block e.printstacktrace(); } catch (ioexception e) { // todo auto-generated catch block e.printstacktrace(); } and when debugged it, reported error: source not found. imported file this: file file = new file("/home/hanrui/workspace/table.csv"). (and debugged other part of codes no error reported)
any appreciated =)
here log:
[2012-06-05 15:27:25 - androidplotexample] installing androidplotexample.apk...
[2012-06-05 15:27:52 - androidplotexample] success!
[2012-06-05 15:27:52 - androidplotexample] starting activity edu.ius.rwisman.androidplotexample.androidplotexampleactivity on device emulator-5554
[2012-06-05 15:27:53 - androidplotexample] activitymanager: starting: intent { act=android.intent.action.main cat=[android.intent.category.launcher] cmp=edu.ius.rwisman.androidplotexample/.androidplotexampleactivity }
[2012-06-05 15:27:54 - androidplotexample] attempting connect debugger 'edu.ius.rwisman.androidplotexample' on port 8643
this problem not related code problem ide. short error description looks class doesn't have associated source code.
edit: try close eclipse , check if there java ghost processes. if kill them, restart eclipse , try again
Comments
Post a Comment