Frage

so i have made a program in java and i tested it on windows 7 64 bits, it work pretty good but when i tried to run in a windows vista 32 bits, most of the program methods doesn't work, for exemple, a simple piece of code like this

propriedades.store(new FileOutputStream("c:\\Sms beta 1.0\\config.properties"), null);

don't work on vista, the program run and the frames are displayed but saving files and connecting some devices from COM ports to the computer doesn't work and i can't figure out why... It's because any protection of vista or there may be some methods that can be only used by 64 bits system? Thank you in advance for the help.

War es hilfreich?

Lösung

The FileNotFoundException implies one of two things:

  1. The folder C:\Sms beta 1.0 doesn't exist.

  2. The folder does exist, but your program doesn't have permission to write to it and/or the file in it. Change the permissions of the folder (right-click it and click 'Properties' -> 'Security') to allow read & write access by the user that the program runs as, or to change the owner of the folder. Or, run the program as a different user account that has the necessary permissions.

I suspect it's a permissions issue, since you also mentioned a problem accessing COM ports. Perhaps you are running the program as an administrator on your Windows 7 machine, but as a regular user on Vista.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top