Stefan Evans wrote:#1: You need to compile from the "root" directory of your package hierarchy, or specify a source path. I think in this case this means the "src" directory.
#2: I think the quotes need to go around the ENTIRE argument for one parameter (I might be wrong)
#3: You should be using a semicolon (;) to separate classpath elements on windows. You have a colon ( separating classes and the dot. Use a semicolon on windows, and a colon on unix.
Apologies, I haven't actually tried this out (and it has been ages since I used the command line) but try variations around those suggestions.
#1 - change directory to C:\Users\Carlos L\Tomcat\My Tomcat Projects\beer-v1\src
#2 - javac -classpath "C:\Users\Carlos L\Tomcat\apache-tomcat-8.0.28\lib\servlet-api.jar;..\classes;." -d../classes com\example\web\BeerSelect.java
javac -classpath "C:\Users\Carlos L\Tomcat\apache-tomcat-8.0.28\lib\servlet-api.jar;classes;." -d classes -sourcepath src com\example\web\BeerSelect.java
Carlos L Sanchez wrote:Ok so basically this solved it for me:
C:Users\Carlos L\Tomcat\My Tomcat Projects\beer-v1>
-classpath "C:\Users\Carlos L\Tomcat\apache-tomcat-8.0.28\lib\servlet-api.jar";"C:\Users\Carlos L\Tomcat\My Tomcat Projects\beer-v1\classes";classes:. -d classes src\com\example\web\BeerSelect.java
Soo, basically you sit at the project root folder, this case the beer-v1
then execute the javac, including in the classpath the servlet-api.jar and also the path to the class to be included because of dependency.
Now, it still compiles one more error, it says package result does not exist:
Iterator it = new result.iterator();
Any idea why this is, i checked for a typo in my classes but i could not find anything very obvious, and the util, is included, so it shouldnt have problems with the iterator, sigh...