This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

importing root stuff

 
Paul Keohan
Ranch Hand
Posts: 411
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am adding a class to an existing project and it makes sense to place it in a different package. The existing numerous classes were not 'packaged' so their class files are in the directory where their java files sit. I want to access one of these classes but I don't know how to get to it. There is no package to import.
How do I get around this problem?
Paul
 
Rick Bos
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the Class has no package, then you have to
put whatever directory you put the .class file
in, in the CLASSPATH.
So, if you decide to put your .class file in a
subdirectory, then that subdirectory has to be in the classpath.
I hope that helps.
 
Paul Keohan
Ranch Hand
Posts: 411
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That makes complete sense to me but I tried it, and it didn't work. I even tried putting the class file itself into the classpath and still no luck.
Any ideas?
Thanks.
Paul
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic