We have a java application published through citrix. When application is launched for a new user, it crashes immediately on startup.

If we login using RDP, then log out (not starting the app), it starts to work.

We've published another smaller java app, and it works for new users, without the need to first log on using RDP.


- Publish java app
- create new user
- run published app in citrix -> crash
- log on user using rdp, log out
- run published app in citrix -> works fine

Its becoming real tiresom to log on each new user to each citrix server :-P


This seems to be a Bug please refer to the following URLS for more details.



  • I have not had time to check out and test your suggestions and will not have time before the bount runs out. Not sure what happens with the bounty if no reply has at least two up-votes and i dont assign bounty manually. So Ill give you the bounty and Ill get back to this question when I know more.. – Brimstedt Dec 28 '10 at 7:18

The problem was related to the specific code, which read AppData setting from registry.

This is from netbeans launcher (which is possibly changed in later versions)

char* getUserHomeFromRegistry(char* userhome)
    HKEY key;

    if (RegOpenKeyEx(
            "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders",
            &key) != 0)
        return NULL;

    char *path = GetStringValue(key, "AppData");

    strcpy(userhome, path);
    return userhome;

This registry setting is not always available, which then causes a crash.

However, %APPDATA% env variable is, so we made logon app that sets registry if it is not available.

Thanks Mr Zanchenko for finding the cause and solving it!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.