File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Java in General
Bookmark "classpath question" Watch "classpath question" New topic

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/ instantiates a class which is src/com/example/model/

now i want to compile 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/

i got the error invalid flag Files\Apache

I have imported model in

Any help in this regard is greatly appreciated



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

Joined: Jul 08, 2003
Posts: 24199

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]
I agree. Here's the link:
subject: classpath question
It's not a secret anymore!