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

Package question.

 
Pete Tyo
Ranch Hand
Posts: 38
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I downloaded a package that I want to mess around with. I do not understand where I need to put it though...
I am working in a directory c:\jdk\app that is where my main program I am creating is at. the package say net.something.stuff okay I now where that folder system is at.. Do i need to put the folders in the
c:\jdk\app director to use import net.something.stuff.*; ??? We never had to do this in are class and for some reason I can't figure this out.

Thanks,

Pete
 
miguel lisboa
Ranch Hand
Posts: 1281
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
add your package to classpath
 
Sania Marsh
Ranch Hand
Posts: 469
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It doesn't really matter where you put it, but you better have one place where you keep your packages.
What important is that the root directory path where you place you package is listed in the CLASSPATH environment variable.
You can also place the package in the folder your .java file is, that should work without setting the CLASSPATH, if it doesn't, you can add "." as path in the CLASSPATH.

To set the CLASSPATH on Windows go to Control Panel->System-> Advanced Tab ->Environment Variables, don't overwrite the CLASSPATH, just add your path at the end afer semicolon.

You should have done this in class, suggest to your professor
 
Pete Tyo
Ranch Hand
Posts: 38
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah, okay. I understand now and got it to work thanks..

Pete
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic