I'm using
J2EE SDK1.4 to work some basic examples on JMS.
In all examples that i see on sun tutorials, the syntax they use for lookup is as below:
jndiContext =new InitialContext();
There is no hard coding for the Initial Context Factory.
However when i execute the examples it gives me an exception as below:
---------------------------------------------------------------------------
D:\examples\JMS>
java -Djms.properties=%J2EE_HOME%\config\jms_client.properties
roperties SimpleQueueReceiver MyQueue
Queue name is MyQueue
JNDI API lookup failed:javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an
applet parameter, or in an application resource file: java.naming.factory.initial
----------------------------------------------------------------------------
which i infer means that the initial context was not created.
How do i go abt with this?
Where is the properties file located in the J2EE SDK?
Also if i need to hard code it how can i go about it?
Also if i need to do lookup on some other container like eg weblogic 8.1 or websphere 5.0 where is the properties file located? How to go abt it?
Sorry, i know thats toooooo may questions. But hope someone can help. This is VERY URGENT!!!