• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

finding classpath from eclipse

 
subodh gupta
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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
Pie
Posts: 18226
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Add a line of code to get the classpath property from the java.System packages and print it.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your Eclipse project's root directory should hold an XML file called ".classpath" that defines the class path.
 
Paul Clapham
Sheriff
Posts: 21152
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic