Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Beginning Java and the fly likes how to set classpath for java in mac? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "how to set classpath for java in mac?" Watch "how to set classpath for java in mac?" New topic
Author

how to set classpath for java in mac?

sudheer raj shetty
Greenhorn

Joined: Sep 02, 2009
Posts: 16
Hi,

am new to mac and i want to run java program. am using 6 jar files to run this program. For this i need to set classpath. please guide me to set classpath.
currently i have all my jar files on desktop.

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42289
    
  64
You can move libraries that you always want in the classpath to the /System/Library/Java/Extensions folder.

I don't recommend using the CLASSPATH environment variable on any operating system. If a project gets larger and requires more than one library, I generally set up an Ant build file for it.


Ping & DNS - my free Android networking tools app
sudheer raj shetty
Greenhorn

Joined: Sep 02, 2009
Posts: 16
Thanks ulf..
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Meh; I don't like adding application libraries to the system Java extensions--too many chances of a conflict.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to set classpath for java in mac?