Problems with deploying Java applications

I have just completed a Java application linked to sicstus Prolog Now I need to deploy it, but I have encountered the following problems. The sicstus library linked to Java requires the following sintax to call the application:

java -classpath=path/to/sicstus/installation/dir -jar /path/to/jarfile.jar

I'm deploying SH or Bat file, but the user must edit it manually and specify the location of the sicstus installation directory How can I avoid this?

I'm really stuck here I've tried several installer builders, such as JSMOOTH and Glassworks, but these don't solve my problem Any ideas?

Joshua

Solution

Create an installer using izpack This allows you to install the application in the desired directory

http://izpack.org

In addition, you can parse the bat file to point to the installation directory by doing the following:

Create a run like this Bat file of bat:

java -classpath=$INSTALL_PATH/lib/alib.jar  -jar $INSTALL_PATH/bin/myapp.jar

And install Specify the following in XML:

<pack name="Base" required="yes">
        <file src="run.bat" targetdir="$INSTALL_PATH" override="true" />
                <parsable targetfile="$INSTALL_PATH/run.bat"/>
</pack>

This parses the bat and replaces it with the installation directory

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>