I'm trying to wrap an existing application with several jar files. Two of them has dash character "-" in the string.
It seems launch4j can't take file name that has dash "-" in it. The error is
Fatal Error: one of the following jar files is missing from the classpath:
Please make sure you run the application from the shortcut that was
installed on your desktop or on the Start menu when you upgraded.
I tried to add "\" in front of "-", but it doesn't work.
How can I fix it? I don't want to change file names.
I'm running the application from Windows.
The original command line is
C:\Windows\SysWOW64\javaw.exe -cp jts.jar;hsqldb.jar;jcommon-1.0.12.jar;jfreechart-1.0.9.jar;jhall.jar;other.jar;rss.jar -Dsun.java2d.noddraw=true -Xmx512M jclient/LoginFrame C:\Jts
In launch4j GUI I checked Custom classpath, main class is jclient.LoginFrame, and in Classpath I entered
Even if I change file name in Windows and change classpath to jcommon.jar & jfreechart.jar in launch4j, after compilation and launching the exe, it still give same error message.
My bad. It's not just those 2 files. I found that I need to use absolute file path for all classpath entries.
Now it's solved.