Search code examples
javajava-web-start

Java 7u65 and 7u67 windows webstart cache path error (Could not load file/URL specified)


A user reported the following error trying to start an application via WebStart on Windows 7:

Could not load file/URL specified: C:\Users\Höfn\AppData...

The Windows locale is Iceland and the 'Language for non-Unicode programs' setting is Icelandic. Note the Windows username is supposed to be "Höfn", but the "ö" character looks corrupted in the error message so it seems the path can not contain unicode characters.

The application worked fine prior to the latest Java update.

I tried deleting the Java cache but the problem persisted.

I solved the problem (temporarily) by uninstalling the latest Java update and installing JRE 7 update 60.

I figured more people would run into this problem and require a temporary solution.


Solution

  • This problem starts with Java 7u65 as it is present on all later Java versions including 7u67 and 8u11. I submitted bug report.

    While we wait for Oracle to fix this, here are three things we can do:

    Workaround one: (only works for Java < 7u65)

    1. Go to Control Panel -> Regional and Language Options -> Administrative (Advanced) -> Language for non-Unicode programs
    2. Set "Current language for non-Unicode programs" to any language that uses Unicode letters.

    Workaround two: (works for all - Change Java temporary path of user)

    1. Create new directory for example C:\TempJava\ASCII_USERNAME (without Unicode letters inside path name)
    2. As changing Java temp path inside Windows7 is disabled in Java Control Panel, there is workaround:
      • Open file %SYSTEMDRIVE%\Users\%USERNAME%\AppData\LocalLow\Sun\Java\Deployment\deployment.properties
      • Add line: deployment.user.cachedir=C:\TempJava\ASCII_USERNAME
      • Save and try to run JNLP again

    Workaround three: (works for all)

    1. Create user with account name in ascii text (without multi-byte letters)
    2. Start JNLP from that account