Win a copy of OCP Oracle Certified Professional Java SE 11 Developer Practice Tests this week in the OCP 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
Sheriffs:
  • Devaka Cooray
  • paul wheaton
  • Mark Herschberg
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
Bartenders:
  • Carey Brown
  • salvin francis
  • Piet Souris

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
 
He was expelled for perverse baking experiments. This tiny ad is a model student:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic