This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes How to make cmd prompt to read .java/.class files from another folder? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to make cmd prompt to read .java/.class files from another folder?" Watch "How to make cmd prompt to read .java/.class files from another folder?" New topic
Author

How to make cmd prompt to read .java/.class files from another folder?

Henry Hang
Greenhorn

Joined: Oct 15, 2011
Posts: 3
Hello!

I have all my things packed in C:/users/me

Is there a way I can put all my work in a folder and have cmd prompt retrieve files from that specific folder?
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 8626
    
  23

Henry Hang wrote:Is there a way I can put all my work in a folder and have cmd prompt retrieve files from that specific folder?

Not sure, but assuming this is Windows, you can always set up an icon that runs 'cmd' from a particular directory. Eventually, you'll be creating jars so this won't be a problem, so I wouldn't spend a lot of time on it.

Winston


Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 41091
    
  29
Welcome to the Ranch

java C:\MyFolder\MyOtherFolder\MySubfolder\Foo

??

Try it and see whether it works. But it is usually easier to navigate to that folder.
 
 
subject: How to make cmd prompt to read .java/.class files from another folder?