• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Having trouble compiling client in EJB Headfirst Book

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
posted August 22, 2004 12:21 AM
--------------------------------------------------------------------------------
Hello,

I'm having some frustration compiling the client on p.57 of Head First EJB.

I confess that I have a J2EE 1.4 configuration, not 1.3, but will study from the exam from the EJB 2.0 spec.

When I compile,it cannot find javax.ejb.My environment vars are configured as follows:
PATH=C:\Sun\AppServer\bin;C:\jwsdp-1.3\jwsdp-shared\bin
JAVA_HOME=c:\j2sdk1.4.2_04
J2EE_HOME=c:\Sun\AppServer
CLASSPATH=.;\projects\advice\classes\headfirst\;c:\Sun\AppServer\lib\j2ee.jar

I am not feeling Wickedlysmart just yet . Can someone please help.

Thank you!!!,

Ken Rubin
SCJP
 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Ken
I guess there can be two problems.
1. You definitely need to have j2ee 1.3
2. On windows use following command to compile
javac -classpath %CLASSPATH%;c:/</YOUR_PATH to/>AdviceAppClient.jar AdviceClient.java
(command given in book page 57 is no good for windows)

You can refer to this Thread Topic: HFEJB AdviceClient for other helpful tips.

Hope this helps.
[ August 22, 2004: Message edited by: Muzammil Hussain ]
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Folks,

RE: HFEJB tutorial in Chapter 1, AdviceBean, etc.
I seem to be having the same compile problem at Ken... I have
installed J2EE 1.3.1 and set my environment vars as follows:
J2EE_HOME is c:\j2sdkee1.3.1
JAVA_HOME is c:\java\j2re1.4.2
PATH is c:\java\j2re1.4.2\bin

Haven't set CLASSPATH. When I just try to compile the first
three .java files (AdviceBean.java, Advice.java, AdviceHome.java)
I am getting error " javax.ejb" not found and of course my
reference to SessionBean, etc. interfaces error out too.
Compile from dos command prompt with: javac -d ../classes headfirst/*.java

It has been a long day on this one - any shove in the right
direction would be a great help. Thanks much, Donna
 
Ranch Hand
Posts: 393
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

There must a jar file called "J2EE.jar" under j2sdkee1.3.1 folder.Set this jar in your classpath and then try compling your code.

It should work.

Regards,
 
Donna Ashbaugh
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you James.... my programs compiled
by adding that CLASSPATH ...\lib\j2ee.jar. This is
a learning experience for me - appreciate your help!!

Donna
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic