aspose file tools*
The moose likes Java in General and the fly likes classpath question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "classpath question" Watch "classpath question" New topic
Author

classpath question

Rajesh Vijaya
Ranch Hand

Joined: Oct 18, 2005
Posts: 48
hi ,

my classpath settings are

classpath= c:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib\servelt-api.jar

and I''m having a Folder called brv1 in D:\JAVA\brv1

brv1 further contains src and classes sub folders

src/com/example/web/test1.java

test1.java instantiates a class test2.java which is src/com/example/model/test2.java

now i want to compile test2.java and put the resulting class file in classes folder with the same folder hierarchy...

i tried this command at d:\JAVA\brv1

javac -classpath %classpath%:src/com/example/model/*.* -d classes src/com/example/web/test1.java

i got the error invalid flag Files\Apache

I have imported model in test2.java

Any help in this regard is greatly appreciated

Thanks

Rajesh


Rajesh <br /> <br />SCJP1.4 SCWCD1.4 SCBCD 1.3 ,SCDJWS(Preparing..)<br /> <br />There is no free will.It is the phenomenon bound by cause and effect.But there is something behind will which is free---Swami Vivekananda...
Tony Morris
Ranch Hand

Joined: Sep 24, 2003
Posts: 1608
You need to learn how to use your shell, which I assume is the windows command prompt. You cannot have spaces in command line parameters unless they are quoted. You also need to read up on what a classpath is, how it is set, and if you're really keen, why it should never be set.

You're also likely to receive a request regarding your nickname, which doesn't adhere to the convention of this forum.


Tony Morris
Java Q&A (FAQ, Trivia)
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Rajesh --

Welcome to JavaRanch!

As promised, a warning about calling yourself "TEN Commandments": you may not have read our naming policy on the way in. It requires that you use a full, real (sounding) first and last name for your display name. Joke names and "handles" aren't acceptable at the Ranch. You can change your display name here. Thanks for your cooperation.


[Jess in Action][AskingGoodQuestions]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: classpath question