[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipse-dev] How does Eclipse runtime make use of the ShellFolders/Desktop registry key?

Hello Cyrus,

Apologies for the belated response, I just realized that I had saved my response as a draft and forgot to send it out.

I checked all the code in Eclipse that could have something to do with Windows registry entries and I can confirm that we do not make use of the particular registry key mentioned by you anywhere.
However, its possible that the value of the registry key is used either by the JVM or the OS layer as a consequence of some APIs invoked from within Eclipse or the application based on Eclipse. Most probably, the error is happening because the non-administrative user is trying to create a folder named "%username%" inside "C:\Users" for which the permissions are not sufficient (which wouldn't be the case with an admin user account).

Irrespective of that, Java should not be crashing with the mentioned error unless there is some other problem also involved. Can you please check if there is more information regarding the Java application crash in a Java crash log or in the .log file that is part of the workspace, and provide the relevant stack trace at the point of exit?

I'm also curious as to why the value of the registry key doesn't include the substituted username in your case by default, I checked on my Windows 7 machine and found that the value of the registry key has the actual substituted username of the account instead of %username%. Perhaps it would be more useful to figure out the reason for this so that the intended behavior of using the correct user's Desktop folder path can be achieved.


Inactive hide details for Cyrus Tsang ---07-01-2017 07:16:36 PM---Hi Eclipse-Dev,Cyrus Tsang ---07-01-2017 07:16:36 PM---Hi Eclipse-Dev,

From: Cyrus Tsang <cyrustsang@xxxxxxxxxx>
To: eclipse-dev@xxxxxxxxxxx
Date: 07-01-17 07:16 PM
Subject: [eclipse-dev] How does Eclipse runtime make use of the Shell Folders/Desktop registry key?
Sent by: eclipse-dev-bounces@xxxxxxxxxxx

Hi Eclipse-Dev,

I have a question regarding an Eclipse based application and was wondering if someone could help.

The application is built on Eclipse 4.3.1 (64 bit), running on Windows server 2008 R2 (64 bit).

When I launch the application from an administrative user account, it creates a folder C:\Users\%username%\Desktop. This is because my registry key:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Desktop

has the value of:


However, when I launch the application from a non-administrative user account, I get the following error:

Java was started by returned exit code=13
-Djava.class.path=C:\Program Files\Apps\MyApplication\plugins\org.eclipse.quinox.launcher_1.3.0.v20130327-1440.jar
-os win32
-ws win32
-arch x86
-launcher C:\Program Files\Apps\MyApplication\MyApp.exe
-name MyApp
--launcher.library C:\Program Files\Apps\MyApplication\plugins\org.eclipse.quinox.launcher.win32.win32.x86_1.1.2--.v20130807-1835\eclipse_1503.dll
-startup C:\Program Files\Apps\MyApplication\plugins\org.eclipse.quinox.launcher_1.3.0.v20130327-1440.jar
-vm C:\Program Files\Apps\MyApplication\\jre/jre/bin\j9vm\jvm.dll
-Djava.class.path=C:\Program Files\Apps\MyApplication\plugins\org.eclipse.quinox.launcher_1.3.0.v20130327-1440.jar

This might be because the non-administrative user do not have sufficient right to create the folder C:\Users\%username%\Desktop. (But the non-administrative user should have sufficient right to write to their own Desktop path??)

The application would start without error if I hardcoded the value of the "Desktop" registry (i.e. without the use of %username%, like so:


I also noticed that if I deleted the "Desktop" registry key, the application would start fine too.

I have checked folder permissions on the C:\Users\MyUserName and C:\Users\MyUserName\Desktop, both of them have "owner" permission level.

Given this, I was wondering if you could provide some information about how the Eclipse runtime make use of the "Desktop" registry key and why does it seem like the application could only resolve the %username% variable as an administrative user? While for the non-administrative user, the registry key has to be hardcoded?

Thank you all in advance.


Cyrus Tsang

WebSphere MQ L3 Software Engineer

Mobile: +44 (0)7799868749

Hursley House, Hursley Park Road
Winchester, SO21 2JN
United Kingdom

IBM United Kingdom Limited
Registered in England and Wales with number 741598
Registered office: PO Box 41, North Harbour, Portsmouth, Hants. PO6 3AU

Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU_______________________________________________
eclipse-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit