aspose file tools*
The moose likes Java in General and the fly likes Cannot run JAR file under folder which has unicode characters in name Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Cannot run JAR file under folder which has unicode characters in name" Watch "Cannot run JAR file under folder which has unicode characters in name" New topic
Author

Cannot run JAR file under folder which has unicode characters in name

Nam Ha Minh
Ranch Hand

Joined: Oct 31, 2011
Posts: 498

Hi all,

If I put my application's JAR file under one of these folders:

- C:\Test\GÖRLITZ\MyApp.jar: It will run if double clicking on the Jar file, but it won't run if I run through Runtime.getRuntime().exe()
- C:\Test\Hay chửa\MyApp.jar: It won't run on either double clicking or calling Runtime.getRuntime().exe()

Looks like the Java launcher doesn't work well with unicode characters in file path.
Please suggest solution/workaround.

Thanks,
Nam


PM Me If You Want to get Urgent Help on Java Programming
Nam Ha Minh
Ranch Hand

Joined: Oct 31, 2011
Posts: 498

No one has any ideas?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18651
    
    8

You're looking for workarounds? Then write a batch file with the folder name hard-coded, and run that batch file via Runtime.exec().
Nam Ha Minh
Ranch Hand

Joined: Oct 31, 2011
Posts: 498

Paul Clapham wrote:You're looking for workarounds? Then write a batch file with the folder name hard-coded, and run that batch file via Runtime.exec().

Yes, I need a workaround. I will try your suggestion.
Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Cannot run JAR file under folder which has unicode characters in name