Java Manifest.mf classpath issues

前端 未结 2 1415
清酒与你
清酒与你 2021-01-14 19:20

I\'ve been trying to run a jar file - let\'s call it test.jar - that uses the Sybase jconn3.jar on a Unix system.

I have created a MANIFEST.MF file that has the foll

2条回答
  •  天涯浪人
    2021-01-14 19:37

    Environment variables are not readed by the classloader AFAIK. However you could add the jar in a configuration script

    Accoding to the specification the entries are relatives to the jar not absolute:

    Class-Path :

    The value of this attribute specifies the relative URLs of the extensions or libraries that this application or extension needs. URLs are separated by one or more spaces. The application or extension class loader uses the value of this attribute to construct its internal search path.

    http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html #Manifest Specification

提交回复
热议问题