Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Classpaths in Eclipse

 
Steve Campbell
Ranch Hand
Posts: 41
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I thought I had it figured out, but....
I have a Java program (without a package statement) which references a class which is in a package. Using NetBeans I'm able to use the code in the class (for which I don't have the source code, only a .class file).
When I try to use Eclipse, I'm having a problem using the .class file in the project. In Eclipse I added a variable (under Windows / Preferences) which pointed to the base of the package. I then added this variable into the Project (using project properties). No matter how I tweak the variable path, or try every different way, I'm unable to reference the class in the .class file. I've read through the help file many time to no avail.
Does anyone know how to do this?
Thanks,
Steve
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried using "Add Class Folder" in the project properties?
 
Steve Campbell
Ranch Hand
Posts: 41
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Everytime I use the "Add Class Folder" option, the "Ok" button never comes on to allow me to close the dialog box. I'll look further into this option if this is the correct way to do this.
When I click on "Add Class Folder", it show mw the 2 projects I've created with this tool, one of them being the project to which I want to add the path to the class. Since the .class file is along another path, I then clicked the "Create New Folder", then "Advanced", then I checked the "Link to folder in the file system" checkbox, and bring the folder.
I was typing in the above commands, and now it's working.
Thanks for you help,
Steve
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic