Remember that when you compile a java source file ...
a) You must have the classes it will use when it runs available to the compiler so that it can check (a bit frustrating at times if you're compiling on one machine but going to be running on another)
b) If you supply only java course code for some of the classes used within the class you're compiling, or have updated the sources of those used classes, Java will automatically recompile them. (this can be a bit confusing when you see an error message referring to "line 65" and don't even have a line 65 in the file you've asked to be compiled - the error being in one of the other files)
Here's an example where I compiled a "Sales" application on last week's
Java Course:
Dorothy:c2 grahamellis$ ls
Period.java Product.java Sales.java Single.java
Dorothy:c2 grahamellis$ javac Sales.java
Dorothy:c2 grahamellis$ ls
Period.class Product.class Sales.class Single.class
Period.java Product.java Sales.java Single.java
Dorothy:c2 grahamellis$
See that running
here
(written 2008-03-03 07:20:34)
Associated topics are indexed under
A502 - Web Application Deployment - Java - Basic Tools [2422] Looking inside Java classes - javap and javadoc - (2009-09-25)
[2153] Class Loading and Variable Conversion in Java - (2009-05-02)
[1909] javax.servlet cannot be resolved - how to solve - (2008-11-26)
[1771] More HowTo diagrams - MySQL, Tomcat and Java - (2008-08-24)
[1192] What are WEB-INF and META-INF directories? - (2007-05-18)
[1082] Straight from the .jar - (2007-02-16)
[754] tar, jar, war, ear, sar files - (2006-06-10)
J606 - Java Roadmap - Beyond the Fundamentals [2036] Java Tag Libraries / how they work / Tomcat Deployment - (2009-02-11)
[1910] Java - Generics - (2008-11-27)
[1049] Java 6, Apache Tomcat 6. - (2007-01-21)
Some other Articles
Strange behaviour of web directory requests without a trailing slashLanguages compared - based on developer community sizeDefault file (MiMe types) for Apache httpd and Apache TomcatGuidlines for posting on a forumJava Compiler - needs all classes, compiles them all tooUploading to a MySQL database through PHP - examples and common questionsHST Power Car TravelWatch SouthWestCalling on Melksham / Trowbridge / Devizes / Chippenham businessesGetting somewhere with the train serviceTrying out our Java examples on our web site