Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Running the headfirst ejb 1st chapter - problem running

 
Hari MohanSingh
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am able to compile just fine. When I run:

This works:
D:\workspaces\EJB\advice>java -classpath .;C:\j2sdkee1.3.1\lib\j2ee.jar;AdviceAppClient.jar AdviceClient
test2

but this does not:
D:\workspaces\EJB\advice>java -classpath .;C:\j2sdkee1.3.1\lib\;AdviceAppClient.jar AdviceClient
javax.naming.NoInitialContextException: Need to specify class name in environment 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(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:15)
at AdviceClient.main(AdviceClient.java:9)

Could someone please help me understand why the second does not work?

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic