currently i get messages from my customers which having trouble to open files on Mac in the Preview app, when the Preview app isn't started yet.
When the Preview app is already open, there's no problem opening the files.
Servoy: 7.5.10
Java: 1.8 Update 151
OS: High Sierra (10.13.2)
First i write a pdf-File in the clients temp folder:
- Code: Select all
var tmpFile= plugins.file.createTempFile(...)
plugins.file.writeFile(tmpFile, blob)
Then i try to open that file:
- Code: Select all
application.executeProgram('open', [tmpFile.getAbsolutePath()])
When the Preview app is already started, the PDF file will open without problems.
But when Preview is not open i see in the dock for less then a second, that the Preview app tries to start.
The console has the following output when opening the file:
- Code: Select all
Sandbox: Preview(35168) deny(1) file-read-data /Users/astefan/Library/Application Support/Oracle/Java/Deployment/cache/6.0/bundles
So it seems to be a permission problem in the sandbox.
I also tried to use the "open" command directly in the Terminal - this works!
Does anybody has the same issue? Is there a solution?
The same issue appears when opening a Word document: When Word is already open, no problem...
I noticed that another customer with Java 8 Update 131 has no problem opening these files (still when Preview isn't open!)
So is it a Java bug?
Thanks!
Alex