javac -classpath C:\jakart-tomcat-5.5.9\common\lib\servlet-api.jar;C:\servlets+jsp\beerV1\src -d classes src\com\example\web\BeerSelect.java
By Ananth, Bangalore
Originally posted by abhijit Ohal:
Use ant for compiling building your webapplication
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
The command line quoted does not look particularly long.
Your command line is a bit long to keep typing in, however.
javac -classpath C:\jakart-tomcat-5.5.9\common\lib\servlet-api.jar;C:\servlets+jsp\beerV1\src -d classes src\com\example\web\Bee
REM Use SETLOCAL so the calling command-line does not see changes
SETLOCAL
SET CLASSPATH=%CLASSPATH%;mypath\myjar.jar;anotherpath\anotherjar.jar;mydir
javac -d classes MyClass.java
ENDLOCAL
if you need to compile the servlet, just call the .BAT file..
JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Originally posted by Marilyn de Queiroz:
Which OS are you using? Win9x?
To get the DOS prompt, do you type command.com or cmd.exe?
To use a bat file, you type the commands, one per line. So
SET CLASSPATH=%CLASSPATH%;mypath\myjar.jar;anotherpath\anotherjar.jar;mydir
javac -d classes MyClass.java
is two commands -- one to set the classpath and the other to run the javac command.
SETLOCAL
SET CLASSPATH=%CLASSPATH%;mypath\myjar.jar;anotherpath\anotherjar.jar
mydir javac -d classes MyClass.java
ENDLOCAL
REM this is a batch file to run a long javac command that wouldn't fit in a DOS window
SETLOCAL
SET CLASSPATH=%CLASSPATH%;C:\jakart-tomcat-5.5.9\common\lib\servlet-api.jar;C:\servlets+jsp\beerV1\src
javac -d classes src\com\example\web\BeerSelect.java
ENDLOCAL
C:\servlets+jsp\beerV1>compile.bat
C:\servlets+jsp\beerV1>REM this is a batch file to run a long javac command that
wouldn't fit in a DOS window
C:\servlets+jsp\beerV1>
C:\servlets+jsp\beerV1>SETLOCAL
Bad command or file name
C:\servlets+jsp\beerV1>
C:\servlets+jsp\beerV1>SET CLASSPATH=.;C:\javaPrograms;C:\servlets+jsp;C:\jakart
a-tomcat-5.5.9\common\lib\servlet-api.jar;C:\jakarta-tomcat-5.5.9\common\lib\jsp
-api.jar;C:\servlets+jsp\beerV1\src;C:\jakart-tomcat-5.5.9\common\lib\servlet-ap
i.jar;C:\servlets+jsp\beerV1\src
Out of environment space
C:\servlets+jsp\beerV1>javac -d classes src\com\example\web\BeerSelect.java
C:\servlets+jsp\beerV1>
C:\servlets+jsp\beerV1>ENDLOCAL
Bad command or file name
C:\servlets+jsp\beerV1>
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
There is no beard big enough to make me comfortable enough with my masculinity to wear pink. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|