ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Lévy-Lambert <anto...@antbuild.com>
Subject AW: Different behaviour when running <java> from command line
Date Mon, 22 Sep 2003 19:18:06 GMT
Hi Mark,

it sounds like this is a classloader issue.
On top of that, ant 1.6 now ignores externally set CLASSPATH when started
through the command line scripts ant or ant.bat.

See this FAQ entry :

http://ant.apache.org/faq#delegating-classloader

I plan to change ant 1.6 soon to be able at least to use an externally set
CLASSPATH when starting ant from the command line.

It would be good too to find a solution allowing not to have to set
CLASSPATH externally altogether, but only using the nested classpath
elements of the different ant tasks, particularly <java/> or <taskdef/>

Cheers,
Antoine
-----Urspr√ľngliche Nachricht-----
Von: mark stephens [mailto:mark@idrsolutions.com]
Gesendet: Montag, 22. September 2003 19:05
An: Ant Users List
Betreff: Different behaviour when running <java> from command line


I am running some code which uses RC4 and the JCE jar
(bcprov-jdk14-119.jar) from legionoftheBouncyCastle (what a name!). I am
using Java 1.4/Ant 1.6

If I run the code using the command line with

java -Xms8M -Xmx214M -cp
/home/markee/workspace/library/bcprov-jdk14-119.jar:test.jar
org/test/TestCode

it works. However, if I do the same in Ant (same binary, same location)

<java classname="org.test.TestCode" />
  <classpath>
    <pathelement
location="/home/markee/workspace/library/bcprov-jdk14-119.jar" />
    <pathelement location="test.jar" />
    </classpath>
  </java>

I get an Exception java.security.NoSuchAlgorithmException: Cannot find
any provider supporting RC4 when the program is running.

I know it can see bcprov-jdk14-119.jar because if I comment it out, I
get an error earlier in the code when I add the provider.

Any ideas??

MArk


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




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


Mime
View raw message