ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "matus.majchrak" <>
Subject how to define JNDI props, ant failed to find them when runnin ant task
Date Mon, 17 Sep 2007 14:25:56 GMT


I have a simple Ant Task, which looks up EJB in it. 
it works when i run it via Eclipse IDE >run as java app but whne i try to
run it via Ant it gives an NoInitialContextException. Folder structure is
like this 

lib folder conatins all the neccesary jar files, this is not a problem Ant
can find all the needed classes. The particular Ant Task clas is in
-root/lib/Myclient.jar which has this structure:

Ant succesfuly finds the task and runs it, but when it comes to 'ic = new
InitialContext();'  it throws an  javax.naming.NoInitialContextException:
Need to specify class name in environment or system property, or as an
applet parameter, or in an application resource file: 

but the fiels provided is correct, as  I mentioned It works
when i run it from IDE. But somehow Ant doesnt not recognise it 
Any help would be very appreciated.Thanks Matus

View this message in context:
Sent from the Ant - Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message