标签: java file-io path writer
reader = new InputStreamReader(MyClass.class.getResourceAsStream( "/apathdir/textFile.txt"), "UTF-8")
嗨!
我有这个reader,基本上,我想做writer,这样,将此文件保存在jar文件的同一路径上,如:
reader
writer
>ls >myJarFile.jar textFile.txt
>ls
>myJarFile.jar textFile.txt
答案 0 :(得分:0)
试试这个:
./textfile.txt