aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Running the headfirst ejb 1st chapter - problem running Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Running the headfirst ejb 1st chapter - problem running" Watch "Running the headfirst ejb 1st chapter - problem running" New topic
Author

Running the headfirst ejb 1st chapter - problem running

Hari MohanSingh
Greenhorn

Joined: Dec 19, 2010
Posts: 4
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
 
Consider Paul's rocket mass heater.
 
subject: Running the headfirst ejb 1st chapter - problem running