Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
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
尝试这个:
./textfile.txt