Hi all, I have just started preparing for the exam and the 1st program I have written is giving problems. This is the exception I get when I run the client code,
javax.naming.NoInitialContextException: Need to specify class name in environmen t or system property, or as an applet parameter, or in an application resource f ile: java.naming.factory.initial at javax.naming.spi.NamingManager.getInitialContext(Unknown Source) at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source) at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source) at javax.naming.InitialContext.lookup(Unknown Source) at AdviceClient.go(AdviceClient.java:36) at AdviceClient.main(AdviceClient.java:28)
I am using the Head First book and this is the advice project from the 2nd chapter.
If anybody can guide me, it will be great.
The strength of the Wolf is the pack & the strength of the pack is the wolf....Rudyard Kipling
Just include appserv-rt.jar in your classpath while running the code( I tried it on 1.4) and it works fine. This is because SerialContextInitFactory class is present inside appserv-rt.jar. You can find the file in SUN_INSTL/appserver/domains/domain1/lib