• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Himai Minh
  • Carey Brown
  • salvin francis

AdviceAppClient.jar and AdviceClient.java compilation failure...again;-)

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone

I'm working through the Head First EJB (great book so far) and I've run into some trouble when trying to compile the AdviceClient.java. I know this is not the first time that this has been reported, but I've gone over all of the different postings without finding a resolution. I'm sure this is a environment variable issue, but I'm at a loss. Below is the contents of all the important stuff and the results of my compliation attempt. I'd appreciate any guidance that could be provided in solving this issue.

--ENVIRONMENT VARIABLES:

CLASSPATH = .;C:\j2sdk1.4.1_02\bin;C:\j2sdk1.4.1_02\lib;C:\j2sdkee1.3.1\bin;C:\j2sdkee1.3.1\lib\j2ee.jar

J2EE_CLASSPATH = C:\j2sdkee1.3.1\lib

J2EE_HOME = C:\j2sdkee1.3.1

PATH = .;C:\j2sdkee1.3.1\bin;C:\j2sdk1.4.1_02\bin

JAVA_HOME = C:\j2sdk1.4.1_02


--COMPILATION RESULTS:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Raul>CD C:\Documents and Settings\Raul\My Documents\Development\SCBD Prep\projects\advice

C:\Documents and Settings\Raul\My Documents\Development\SCBD Prep\projects\advice>javac -classpath %CLASSPATH%;AdviceAppClient.jar AdviceClient.java
AdviceClient.java:4: package headfirst does not exist
import headfirst.*;
^
AdviceClient.java:19: cannot resolve symbol
symbol : class AdviceHome
location: class AdviceClient
AdviceHome home = (AdviceHome) PortableRemoteObject.narrow(o, AdviceHome.class);
^
AdviceClient.java:19: cannot resolve symbol
symbol : class AdviceHome
location: class AdviceClient
AdviceHome home = (AdviceHome) PortableRemoteObject.narrow(o, AdviceHome.class);
^
AdviceClient.java:19: cannot resolve symbol
symbol : class AdviceHome
location: class AdviceClient
AdviceHome home = (AdviceHome) PortableRemoteObject.narrow(o, AdviceHome.class);
^
AdviceClient.java:21: cannot resolve symbol
symbol : class Advice
location: class AdviceClient
Advice advisor = home.create();
^
5 errors
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't need any of the following on your classpath.

C:\j2sdk1.4.1_02\bin
C:\j2sdk1.4.1_02\lib
C:\j2sdkee1.3.1\bin

Try ...

CLASSPATH = C:\j2sdkee1.3.1\lib\j2ee.jar;.\classes

With this classpath you should not need to specify a classpath on the command line also. The AdviceAppClient.jar is also not needed, and in fact could cause problems. If anything you might put AdviceApp.jar (because it contains the headfirst package), but thats not needed as long as (1) the headfirst package is in your classes folder, (2) your classes folder is just off of your working folder (advidce) and (3) you compile from your working folder (advice). If you compile from your src folder, then use this instead ...

CLASSPATH = C:\j2sdkee1.3.1\lib\j2ee.jar;..\classes

If it still doesn't work then confirm that your headfirst package has all of the interfaces. They should all be there.
 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Raul,

Are you sure that you've placed all the java source files and AdviceAppClient.jar inside a "headfirst" folder:

And compile from folder using:

[ May 30, 2004: Message edited by: Serkan Yazici ]
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys if you want to get this compiled and get moving look no further than what Rob says! Very accurate and to the point...just try that out...trust me. I was also but now
 
yeah, but ... what would PIE do? Especially concerning this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic