This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes IDEs, Version Control and other tools and the fly likes finding classpath from eclipse 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 » Engineering » IDEs, Version Control and other tools
Bookmark "finding classpath from eclipse" Watch "finding classpath from eclipse" New topic

finding classpath from eclipse

subodh gupta
Ranch Hand

Joined: Jul 23, 2007
Posts: 203

I am running my class files in eclipse now i have to run it in console so can somebody tell me how to find wats the classpath eclipse is using so that i dont have to test each jar for that.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16019

Add a line of code to get the classpath property from the java.System packages and print it.

Customer surveys are for companies who didn't pay proper attention to begin with.
Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
Your Eclipse project's root directory should hold an XML file called ".classpath" that defines the class path.

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Paul Clapham

Joined: Oct 14, 2005
Posts: 18541

On the other hand if you just want to run one of your own classes in the console, and you developed it in an Eclipse project, then everything that is in that project's build path should be in your classpath when you run the class at the command line.
I agree. Here's the link:
subject: finding classpath from eclipse