简体   繁体   English

Java应用程序在带空格的文件夹中不起作用

[英]Java application not work in folder with spaces

I am observing the following problem. 我正在观察以下问题。 I create a java application and put all files (runnable jar file + jar to exe + other files and folders into a folder "adim" and place it in D drive (D:\\adim). When I run the application it finds the license.lic file from adim folder works perfectly fine. 我创建一个Java应用程序并将所有文件(可运行的jar文件+ exe的jar文件以及其他文件和文件夹)放入文件夹“ adim”中,并将其放置在D驱动器(D:\\ adim)中。当我运行该应用程序时,它会找到许可证adim文件夹中的.lic文件运行正常。

But when I change the folder "adim" with "Adim With Derby" this application shows an error that "it cannot find the license.lic file". 但是,当我用“ Adim With Derby”更改文件夹“ adim”时,此应用程序显示一个错误,即“无法找到license.lic文件”。

The worst is that when I make a installShield package and install it on "Program files(x86)" [c:\\Program Files(x86)\\ADIM] above mentioned problem appears(license file not found). 最糟糕的是,当我制作installShield软件包并将其安装在上述“程序文件(x86)” [c:\\ Program Files(x86)\\ ADIM]上时,就会出现上述问题(找不到许可证文件)。 Note: the os is windows 7 professional 64bits 注意:操作系统是Windows 7专业版64位

Can anyone help what is wrong and what is its solution? 任何人都可以帮助解决问题和解决方案吗?

您需要正确转义文件名,并在特殊字符前使用反斜杠

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM