Doug Gunnoe
Posts: 22
Nickname: dgun
Registered: May, 2007
|
|
Re: unable to compile servlet
|
Posted: Nov 21, 2007 8:00 PM
|
|
> I got errors as: > javac: invalid flag: files\tomcat
Oh. I'm sorry. I don't think the "classes" part should be in the argument. "classes" would have to refer to a directory.
Here is the -d switch, from sun's website
"-d directory Set the destination directory for class files. The destination directory must already exist; javac will not create the destination directory. If a class is part of a package, javac puts the class file in a subdirectory reflecting the package name, creating directories as needed. For example, if you specify -d c:\myclasses and the class is called com.mypackage.MyClass, then the class file is called c:\myclasses\com\mypackage\MyClass.class. If -d is not specified, javac puts the class file in the same directory as the source file.
Note that the directory specified by -d is not automatically added to your user class path."
And also, I noticed in your argument that you set the classptah with the "-classpath" and the directory with the "-d" switch, but where is the file you are compiling?
should it not be: javac someFile.java -classpath stuff -d stuff
?
Anyway, I hope that I am not doing more harm than good. :|
|
|