B4J Question File write problem

Drago Bratko

Active Member
Licensed User
Longtime User
On some systems (computers), user in which context app is running, don’t have right to write (or modify) a file on filesystem.

To write a file, I use “File.WriteMap”. Is there a way to get some kind of timeout when I try to write (or to check if I have right to write a file before writing). If I don’t do any check, app in such case just get freeze.
 

Drago Bratko

Active Member
Licensed User
Longtime User
Thanks for your fast reply.
Yes, it's permission problem as it happeneds on windows system with restricted domain security policy.
It's production system so I can't debug it ... but it looks to mee that it hangs on the line when I try to write to a file as nothing else is executed.
 
Last edited:
Upvote 0

Drago Bratko

Active Member
Licensed User
Longtime User
Just to make this thread useful ... it was file permission issue :
java.lang.RuntimeException: java.io.FileNotFoundException: C:\Program Files (x86)\RedomatKeyboard\settings.txt (Access is denied)

I didn't found a way to bypass it (of course, it was assumed that I can't do it), but with Try/Catch at least I can now give a message to user and continue to run app.
Thanks Erel.
 
Upvote 0
Top