• Post Reply Bookmark Topic Watch Topic
  • New Topic

HF: JSP & Servlets, compiling on Windows  RSS feed

 
Brent MacKenzie
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok. I hate this. I can't get anything to work. I'm reading Head First: Servlets & JSP. I'm trying to make the first example work and I can't get the BeerSelect.java file to compile on my Windows XP machine.

Here's a copy of the command prompt I was just using with my input and the responses.

C:\WebDev\beerV1>javac -classpath C:\Tomcat\common\lib\servlet-api.jar:classes:.
-d C:\WebDev\beerV1\src\com\example\web\BeerSelect.java
javac: not a directory: C:\WebDev\beerV1\src\com\example\web\BeerSelect.java
Usage: javac <options> <source files>
use -help for a list of possible options

C:\WebDev\beerV1>javac -classpath C:\Tomcat\common\lib\servlet-api.jar:classes:.
-d src\com\example\web\BeerSelect.java
javac: not a directory: src\com\example\web\BeerSelect.java
Usage: javac <options> <source files>
use -help for a list of possible options

C:\WebDev\beerV1>javac -classpath C:\Tomcat\common\lib\servlet-api.jar:classes:.
-d C:\WebDev\beerV1\src\com\example\web\BeerSelect.java
javac: not a directory: C:\WebDev\beerV1\src\com\example\web\BeerSelect.java
Usage: javac <options> <source files>
use -help for a list of possible options

C:\WebDev\beerV1>javac -classpath \Tomcat\common\lib\servlet-api.jar:classes:. -
d \WebDev\beerV1\src\com\example\web\BeerSelect.java
javac: not a directory: \WebDev\beerV1\src\com\example\web\BeerSelect.java
Usage: javac <options> <source files>
use -help for a list of possible options



By the way, I did get the java file to compile on my Linux server, BUT the Servlet wouldn't run on Tomcat. It kept giving me a 404 error and saying that "/Beer-v1/form.html" isn't available even though I know for a fact it was. Tomcat was working and the form.html was showing just fine.

I'm so frustrated. If I could get thie stupid **** like this worked out, I could actually get started LEARNING J2EE!

B

[edited for language]
[ May 20, 2007: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66307
152
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm moving this to the general forum where compilation issues are best handled.

One thing I do see as an issue (which may be the only thing), is the character used as a delimiter in the classpath. Windows insists on doing things it's own way and uses the non-standard semi-colon (rather than colon) as the delimiter.

And please watch your language.
[ May 20, 2007: Message edited by: Bear Bibeault ]
 
Brent MacKenzie
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear,

Please forgive me. I'm an idiot. I confused language terms on this site with another site. (that site is ok with certain language as long as it's not directed at someone) I should avoid foul language altogether. I'm sorry.

Thank you for the advice and I'll check the general forum too.

B
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!