| Author |
Habibi book--HELP-I have a problem compiling the source as outlined on pages 319-320
|
Omobola Wusu
Greenhorn
Joined: Feb 24, 2003
Posts: 5
|
|
---------------------------------------------------------------------------- I have a problem compiling the source as outlined on pages 319-320 of the book. I started reading the book from chapter 1 up to this point, chapter 8. I was successful in compiling and running the DennysDVDs1.0 sample application in chapter 3. I am using java version 1.4.2_05.I have followed every instruction given. I am stuck on the third line of Figure 8-3, Compiling the source into classes directory. The first and second line were successful, but the third line generated 13 compiler errors. Below is a copy of my screen shot. Please, help! Microsoft Windows 2000 [Version 5.00.2195] (C) Copyright 1985-2000 Microsoft Corp. C:\Documents and Settings\Administrator.NDJLT601>cd\ C:\>java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) Java HotSpot(TM) Client VM (build 1.4.2_05-b04, mixed mode) C:\>cd dennysDVDs2.0 C:\dennysDVDs2.0>dir Volume in drive C has no label. Volume Serial Number is 07D0-0B16 Directory of C:\dennysDVDs2.0 08/07/2004 12:38a <DIR> . 08/07/2004 12:38a <DIR> .. 08/07/2004 02:43a <DIR> sampleproject 0 File(s) 0 bytes 3 Dir(s) 22,810,296,320 bytes free C:\dennysDVDs2.0>mkdir classes C:\dennysDVDs2.0>dir Volume in drive C has no label. Volume Serial Number is 07D0-0B16 Directory of C:\dennysDVDs2.0 08/07/2004 12:38a <DIR> . 08/07/2004 12:38a <DIR> .. 08/07/2004 02:43a <DIR> sampleproject 08/07/2004 04:51a <DIR> classes 0 File(s) 0 bytes 4 Dir(s) 22,810,263,552 bytes free C:\dennysDVDs2.0>javac -d classes sampleproject/db/*.java C:\dennysDVDs2.0>javac -d classes sampleproject/remote/*.java sampleproject/remote/DVDConnector.java:5: package sampleproject.db does not exis t import sampleproject.db.*; ^ sampleproject/remote/DVDConnector.java:29: cannot resolve symbol symbol : class DBClient location: class sampleproject.remote.DVDConnector public static DBClient getRemote(String ip) throws RemoteException{ ^ sampleproject/remote/DVDConnector.java:57: cannot resolve symbol symbol : class DBClient location: class sampleproject.remote.DVDConnector public static DBClient getLocal() throws ^ sampleproject/remote/DVDDatabaseImpl.java:7: package sampleproject.db does not e xist import sampleproject.db.*; ^ sampleproject/remote/DVDDatabaseRemote.java:4: package sampleproject.db does not exist import sampleproject.db.*; ^ sampleproject/remote/DVDDatabaseRemote.java:13: cannot resolve symbol symbol : class DBClient location: interface sampleproject.remote.DVDDatabaseRemote public interface DVDDatabaseRemote extends Remote, DBClient { ^ sampleproject/remote/DVDDatabaseImpl.java:33: cannot resolve symbol symbol : class DBClient location: class sampleproject.remote.DVDDatabaseImpl private DBClient db = new DVDDbAdapter(); ^ sampleproject/remote/DVDDatabaseImpl.java:60: cannot resolve symbol symbol : class DVD location: class sampleproject.remote.DVDDatabaseImpl public DVD getDVD(String upc) throws ^ sampleproject/remote/DVDDatabaseImpl.java:117: cannot resolve symbol symbol : class DVD location: class sampleproject.remote.DVDDatabaseImpl public boolean modifyDVD(DVD item) throws ^ sampleproject/remote/RegDVDDatabase.java:4: package sampleproject.db does not ex ist import sampleproject.db.*; ^ sampleproject/remote/DVDConnector.java:33: cannot resolve symbol symbol : class DBClient location: class sampleproject.remote.DVDConnector return (DBClient)Naming.lookup("rmi://" + ip + "/DVDMediator"); ^ sampleproject/remote/DVDConnector.java:60: cannot resolve symbol symbol : class DVDDbAdapter location: class sampleproject.remote.DVDConnector return new DVDDbAdapter(); ^ sampleproject/remote/DVDDatabaseImpl.java:33: cannot resolve symbol symbol : class DVDDbAdapter location: class sampleproject.remote.DVDDatabaseImpl private DBClient db = new DVDDbAdapter(); ^ 13 errors C:\dennysDVDs2.0>
|
 |
peter wooster
Ranch Hand
Joined: Jun 13, 2004
Posts: 1033
|
|
This looks amazingly like your previous post, If this was the Sun Java Forums you would get flamed. As its the kinder gentler JavaRanch, I'll ask for the one thing you didn't tell us in your postings: What is your CLASSPATH set to? When the complier or the runtime can't find things, that's the first place you should look. [fixed typos /pkw] [ August 07, 2004: Message edited by: peter wooster ]
|
 |
Omobola Wusu
Greenhorn
Joined: Feb 24, 2003
Posts: 5
|
|
Thanks for your help. Actually, the two postings are the same. I wasn't even thinking in terms of my CLASSPATH. I was only concentrating on whether I made a typo error while typing the book instructions on the command line. Thanks, Omobola
|
 |
peter wooster
Ranch Hand
Joined: Jun 13, 2004
Posts: 1033
|
|
Originally posted by Omobola Wusu: Thanks for your help. Actually, the two postings are the same. I wasn't even thinking in terms of my CLASSPATH. I was only concentrating on whether I made a typo error while typing the book instructions on the command line. Thanks, Omobola
Your welcome, and Max's book is very useful, but I still haven't downloaded the example. Good luck! /pkw
|
 |
Andrew Monkhouse
author and jackaroo
Marshal Commander
Joined: Mar 28, 2003
Posts: 10814
|
|
Hi Omobola, Welcome to JavaRanch and this forum. I deleted the duplicate post so as to avoid confusion. I am assuming that your thanks to Peter indicates that fixing your classpath did fix your problem. Regards, Andrew
|
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
|
 |
Omobola Wusu
Greenhorn
Joined: Feb 24, 2003
Posts: 5
|
|
Yes, fixing the classpath did fix the problem. Thanks, Omobola
|
 |
 |
|
|
subject: Habibi book--HELP-I have a problem compiling the source as outlined on pages 319-320
|
|
|