java - Read and write file outside Jar -
i making first executable crossplatform jar file bunch of java files have. problem is, need read in values txt file outside file. working before, plop down said txt next .class file , call
javac myclass this.txt now doesn't work, , output expect right outside said class doesn't work either.
any ideas? thank you.
i found answer:
use file reader class, opposed using scanner file ala
scanner scan= new scanner(new file("foo.txt")); //doesn't work scanner scan= new scanner(new filereader("foo.txt")); //does; thank you.
Comments
Post a Comment