Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Strange behaviour for 32 bit exported application(No exception thrown by FileOutputStream)
Strange behaviour for 32 bit exported application [message #1073187] Wed, 24 July 2013 09:32
Balint Pamer is currently offline Balint PamerFriend
Messages: 2
Registered: June 2013
Junior Member

On our project, we have stumbled on a very strange (windows specific) behaviour:
When attempting to save a file as a regular user to the drive C root (e.g.: C:\file.txt), we get the expected access denied exception (as admin rights are needed), when run from eclipse.
But after exporting the application as a 32 bit executable and running it, no exception is thrown!

Attached is a small demo application, exhibiting the problem:
On the program start, it calls the following code (
            FileOutputStream out = new FileOutputStream("C:\\asd.txt");

When run from eclipse, the new FileOutputStream-line will throw the expected exception.
When exported as a 32 bit .exe, no exception is thrown!

Tracing the code of the FileOutputStream constructor, I ended up seeing the exception coming from a native open()-call, so am pretty much stuck.

I could not reproduce this issue with a regular java application, exported as a .jar.

Can anyone help me further?

Balint Pamer

Looking around with process monitor, I'm seeing actual differences between running from eclipse and from an exported application:
The standalone application (eclipse.exe) returns with REPARSE, while running from eclipse (javaw.exe) returns with ACCESS DENIED.
  • Attachment:
    (Size: 17.51KB, Downloaded 86 times)
  • Attachment: difference.png
    (Size: 19.16KB, Downloaded 403 times)

[Updated on: Wed, 24 July 2013 09:49]

Report message to a moderator

Previous Topic:Source bundle generation for bundle only
Next Topic:how to add "move project action" to custom cnf
Goto Forum:

Current Time: Fri Dec 03 17:09:19 GMT 2021

Powered by FUDForum. Page generated in 0.01931 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top