Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Running the headfirst ejb 1st chapter - problem running

Hari MohanSingh
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

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(
at javax.naming.InitialContext.getDefaultInitCtx(
at javax.naming.InitialContext.getURLOrDefaultInitCtx(
at javax.naming.InitialContext.lookup(
at AdviceClient.go(
at AdviceClient.main(

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

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic