Win a copy of Spring Boot in Practice this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

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

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
reply
    Bookmark Topic Watch Topic
  • New Topic