Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

classpath question

 
Rajesh Vijaya
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Tony Morris
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic