0
I have a program that saves contacts in a simple txt file, but when I want to run the jar on another machine (I use the jar for the netbeans package store), when I run on another machine it does not find txt.
On android I can do this by placing the txt file inside the Assets folder, in java I read something about ClassLoader classLoader = getClass().getClassLoader();
but I couldn’t either.
To do this I must put txt in some specific folder or it is otherwise?
Try to change your code so that if it does not find the file, it creates a new one and starts using it. This way, on each machine it will create a different txt. Now if the goal is to have txt in common with various machines, I think this is not the best way, maybe a database is better.
– user28595
Look at this question here, a problem similar to yours. txt file is not found when generating file. jar
– user28595
made using ftp. thanks
– Gustavo Rotondo