• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Classpaths in Eclipse

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you tried using "Add Class Folder" in the project properties?
 
Steve Campbell
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic