Now I got an error on page 85 saying that package com.example.model would not exist. But it exists and contains BeerExpert.class
C:\Dokumente und Einstellungen\ds\Desktop\MyProjects\beerV1>C:\Programme\Java\jd k1.5.0_08\bin\javac -classpath C:\Programme\apache-tomcat-5.5.20\apache-tomcat-5 .5.20\common\lib\servlet-api.jar -d classes src\com\example\web\BeerSelect.java src\com\example\web\BeerSelect.java:3: package com.example.model does not exist import com.example.model.*; ^ src\com\example\web\BeerSelect.java:16: cannot find symbol symbol : class BeerExpert location: class com.example.web.BeerSelect BeerExpert be = new BeerExpert(); ^ src\com\example\web\BeerSelect.java:16: cannot find symbol symbol : class BeerExpert location: class com.example.web.BeerSelect BeerExpert be = new BeerExpert(); ^ 3 errors
Couldn't find out where the mistake is... code is exactly as in HFSJ. Any ideas?
copy you servlet source files to the JDK_dir/bin folder , compile the files there, copy the class files to the desired direcotyr in tomcat, and its done.
Not the best piece of advice to hear from a SCJP owner I would not recommend to put anything in the JDK's bin directory. Learn how to use the classpath for once, and then you'll be able to do anything anywhere. [ November 20, 2006: Message edited by: Satou kurinosuke ]
Joined: Nov 07, 2006
I tried it again with GNU/Linux and now it works. Also that :classes:. thing works. I better use GNU/Linux while working with HFSJ (and tomcat).
Yeah...thats because in HFSJ all the screenshots shown are MAC-OS screenshots....I presume they've(Bates & co.) worked on a MAC (MAC OS is UNIX based)...that's why they've used colons : ...even the Tomcat startup command they've used is startup.sh....