I'm trying to compile and then run the code for AdviceClient.java from page 57, and I'm getting the following error when I goto run the code.
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an
applet pa
rameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:640)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:280)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at AdviceClient.go(AdviceClient.java:19)
at AdviceClient.main(AdviceClient.java:10)
I'm using the following two lines to compile and then run it.
D:\Ejbs\advice>javac -classpath .\classes;d:\j2sdkee1.3.1\lib\j2ee.jar AdviceClient.java
D:\Ejbs\advice>
java AdviceClient
What is going on here?