ben.ganley
Posts: 1
Joined: Thu May 14, 2020 8:29 am

Java service command escaping broken

Hi,

I am building an installer for a Java application, part of the installation installs a service in which I want the user to be able to provide a config file to customise.
Screenshot from 2020-05-14 15-33-32.png
Screenshot from 2020-05-14 15-33-32.png (8.18 KiB) Viewed 2004 times
However, the application fails to launch and I get an error from Spring

Code: Select all

java.lang.IllegalStateException: File extension of config file location 'file:C:/Program' is not known to any PropertySourceLoader. If the location is meant to reference a directory, it must end in '/'
Which is occurring because it's reaching the space after Program in "Program Files". As you can see from my screenshot above, my command should be being passed with surrounding quotes so I'm not quite sure what's going wrong here.

Any advice on how to fix this would be greatly appreciated.

Thanks,
Ben
Catalin
Posts: 6597
Joined: Wed Jun 13, 2018 7:49 am

Re: Java service command escaping broken

Hello Ben and welcome to Advanced Installer forums,

To be fully honest with you, I am not the most familiar when it comes to Java, therefore I may need some more details about this scenario.

First of all, if I understood correctly, it is your application (the executable that we generate for your .JAR) that is failing (please correct me if I'm wrong).

Indeed, the issue seems to be the quotation.

Unfortunately, I do not have a Java application that accepts command line input. However, I have tried to pass a command line so I can see how it is written in the configuration file (.INI file), and here is the result:
javaIni.png
javaIni.png (67.77 KiB) Viewed 2003 times

It looks like, in the config file, the path is correctly passed (including the quotes).

Could you please check your config file and see if the path is correctly passed?

Additionally, in order for me to further investigate this, could you please forward me the following resources, by e-mail at support at advancedinstaller dot com:

- a copy of your .AIP file

- a download link for the setup (that was built with the above mentioned .AIP)

- a test case which I can follow in order to reproduce this issue (including a list of prerequisites. For instance, beside the Java Development Kit, what else would I need to reproduce this?)

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”