This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
    Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

HF: JSP & Servlets (Can't compile my first class on Windows)

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • 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

EDIT by mw: Cleaned up language.
[ May 20, 2007: Message edited by: marc weber ]
 
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
Welcome to JavaRanch!

I understand your frustration (when I started with Servlets, it took me quite a while to find a simple error in my deployment descriptor), but please don't cross-post. People are less likely to volunteer their time when they find the question has already been answered under a duplicate post. Please continue this discussion here.
 
Something about .... going for a swim. With this tiny ad ...
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic