I'm working on application that causes me many problems when working
file1 = "src\\sga\\facturation\\data.ser";
FileInputStream fis = new FileInputrStream(file1);//this works fine on NetBeans
I tried
file1 = "data.ser";
InputStream fis = ClassLoader.getSystemClassLoader().getResourceAsStream(file1);
But nothing; I tried also to change the repertory's path, it told me file not found, I tried even to force the repertory in C:\Folder; where I put my files but nothing works. I tried to delete those lines to see if FileOutputStream works, but it's not the case :( Here's which works on NetBeans
ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(file2));
This is my repertory
Thanks for helping RELATED POSTS NEVER TOLD ME A SOLUTION WHICH WORK, SO IF YOUR ATTENTION WAS TO PUT A -1 ON BEGINING, DO IT AND LEAVE !