Problem with an executable jar
Hello everyone,
I have a working jar file built by an ant script and it's working correctly. I am trying to rework the script so that the jar would be executable. I put the manifest attribute Main-Class and pointed it at the correct location of the class whose main() method should be run, but when I try to execute the jar file via the jar.exe, the main class cannot find the external libraries (I'm using log4j, ojdbc, etc.) and those I have included in the class path with the script creating the jar.
Another thing, when I'm using the standard src and bin dirs for java and class files, do I need to include them in the package path to the main class.
E.g. For example, my main class is located in:
ProjectName/src/package1/package2/MainClass.java
ProjectName/bin/package1/package2/MainClass.bin
and as value for the main-class manifest attribute I've put:
package1/package2/MainClass
Is that correct and have you got any idea what to do so that the application can read from the external libraries (relate them in some specific way, put them in a specific dir)?
Thanks,
A. Dobrev
null

