Specifying directory of 'jarsigner' command for 'signjar' task

View: New views
2 Messages — Rating Filter:   Alert me  

Specifying directory of 'jarsigner' command for 'signjar' task

by th_wm :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

today I had the problem, that the 'signjar' task threw an error message like
  Execute failed: java.io.IOException: CreateProcess: jarsigner.exe -verbose -keystore mykeystore myjar myalias error=2

I learned, that the working directory of jarsigner.exe had to be configured in the PATH environment variable (of Windows XP Prof.); afterwards the task run successfully.

Anyway:
Is there an option or a way to configure the working directory of the jarsigner command within Eclipse to avoid putting the working directory into the system PATH of the OS; if yes, how?

I work with Ant 1.7.0 and use it as a plugin within Eclipse 3.4.2.

Thomas Wiedmann

Re: Specifying directory of 'jarsigner' command for 'signjar' task

by Stefan Bodewig :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 2009-06-18, th_wm <th.wm@...> wrote:

> I learned, that the working directory of jarsigner.exe had to be configured
> in the PATH environment variable (of Windows XP Prof.); afterwards the task
> run successfully.

The task should find jarsigner.exe if it is "in the well known place"
provided by the JDK.

Ant searches for it in ${java.home}/../bin and ${java.home}/bin - for
some reason your java.home system property (usually set by Java
itself) is not pointing to a Java installation that would follow the
exected layout (in most cases java.home points to $JAVA_HOME/jre).

> Is there an option or a way to configure the working directory of
> the jarsigner command within Eclipse to avoid putting the working
> directory into the system PATH of the OS; if yes, how?

Find out why java.home seems to be pointing to the wrong place.

Ant's current trunk (and thus Ant 1.8.0 when it is ready to be
released) adds an executable attribute to the task so you could
specify the path inside your build file (using a property to remain
portable).  See https://issues.apache.org/bugzilla/show_bug.cgi?id=39189

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...