Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8205991

Cannot start application (WinLauncher) if path contains non-ascii character

    XMLWordPrintable

Details

    • x86_64
    • windows_10

    Description

      ADDITIONAL SYSTEM INFORMATION :
      Windows 10 1803, Java SE Development Kit 10.0.1

      Broken: Windows 10 1803 + ő, ű, é or ä
      Broken: Windows 10 1511 + ő or ű
      OK: Windows 10 1709 + é or ä
      OK: Windows 10 1511 + é or ä

      A DESCRIPTION OF THE PROBLEM :
      The application will not start on Windows 10 1803 if the installation path has non-ascii character.

      If the app is installed under C:\Users\User\AppData\Local\FooClient\ then FooClient app will start properly.
      If the app is installed under C:\Users\Fréderic\AppData\Local\FooClient\ then FooClient app wont start.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Use Windows 10 Professional 1803, Oracle Java SE Development Kit 10.0.1 and Inno Setup 5.5.9 (u)
      2. Source code of the minimum app:

      FooClient.java:
      import javax.swing.*;

      public class FooClient {

          public static void main(String[] args) {
              javax.swing.SwingUtilities.invokeLater(() -> {
                  JFrame frame = new JFrame("HelloWorldSwing");
                  frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                  frame.pack();
                  frame.toFront();
                  frame.setVisible(true);
              });
          }
      }

      3. Build it with the following commands
      "C:\Program Files\Java\jdk-10.0.1\bin\javac" FooClient.java
      "C:\Program Files\Java\jdk-10.0.1\bin\jar" cfe fooclient.jar FooClient FooClient.class
      "C:\Program Files\Java\jdk-10.0.1\bin\javapackager" -deploy -native installer -outdir . -srcdir . -srcfiles fooclient.jar -appclass FooClient -verbose

      It produces a native Windows exe package: FooClient-1.0.exe

      4. Start the installer on Windows 1803
      5. Application is installed under C:\Users\%USERNAME%\AppData\Local\FooClient\
      6. If your username has a non-ascii (eg é or ä) character then application will not start.
      7.1. Rename C:\Users\%USERNAME%\AppData\Local\FooClient to C:\Users\%USERNAME%\AppData\Local\FooClienté and the C:\Users\%USERNAME%\AppData\Local\FooClienté\FooClient.exe will not start.
      7.2. Rename C:\Users\%USERNAME%\AppData\Local\FooClient to C:\Users\%USERNAME%\AppData\Local\FooClienta and the C:\Users\%USERNAME%\AppData\Local\FooClienta\FooClient.exe will start.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Application starts properly even when the path contains non-ascii characters.
      ACTUAL -
      Application terminates almost immeditely: for a few millisecs there is a running FooClient.exe process but then it terminates.

      CUSTOMER SUBMITTED WORKAROUND :
      Install application to a directory where the path does not contain ascii characters.

      FREQUENCY : always


      Attachments

        Issue Links

          Activity

            People

              almatvee Alexander Matveev
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated: