Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to set classpath for java in mac?

 
sudheer raj shetty
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
sudheer raj shetty
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks ulf..
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Meh; I don't like adding application libraries to the system Java extensions--too many chances of a conflict.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic