wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes getting javax.naming.NoInitialContextException: Need to specify class name in environmen t or system Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "getting javax.naming.NoInitialContextException: Need to specify class name in environmen t or system" Watch "getting javax.naming.NoInitialContextException: Need to specify class name in environmen t or system" New topic
Author

getting javax.naming.NoInitialContextException: Need to specify class name in environmen t or system

Nitish Bijalwan
Greenhorn

Joined: Jun 17, 2012
Posts: 8
Please help . I have written client for my helloWorld bean class . But it while running it is throwing the javax.naming.NoInitialContextException . I qm using PE server which comes in j2ee 1.4 sdk.
Nitish Bijalwan
Greenhorn

Joined: Jun 17, 2012
Posts: 8
Nitish Bijalwan wrote:Please help . I have written client for my helloWorld bean class . But it while running it is throwing the javax.naming.NoInitialContextException . I qm using PE server which comes in j2ee 1.4 sdk.


Got the answer.


In your classpath variable just add appserv-rt.jar
For example I have install appserv in C: directory
classpath = .;C:\Sun\AppServer\lib\j2ee.jar;C:\Sun\AppServer\lib\appserv-rt.jar;

And just compile it by
javac -classpath %classpath%;AdvieAppClient.jar AdviceClient.java

And run it as

java -cp %classpath%;AdviceAppClient.jar AdviceClient
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: getting javax.naming.NoInitialContextException: Need to specify class name in environmen t or system