This week's book giveaway is in the Artificial Intelligence and Machine Learning forum.
We're giving away four copies of Zero to AI - A non-technical, hype-free guide to prospering in the AI era and have Nicolò Valigi and Gianluca Mauro on-line!
See this thread for details.
Win a copy of Zero to AI - A non-technical, hype-free guide to prospering in the AI era this week in the Artificial Intelligence and Machine Learning forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

jars

 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm new to UNIX.
Successfully installed and ran Java programs on Solaris. But I use Jakarta HttpClient for my program which comes with additional jar files.
I set my .profile as
PATH=.:/usr/local/java/j2sdk1.4.2_01/bin:$PATH
export PATH PS1
How and where do I add the additional jars?
Thanks in advance,
Divya
 
Ranch Hand
Posts: 919
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will need to add the jarfile paths to the CLASSPATH environment variable, delimited by the ':' character, as in the PATH environment variable. For jar files on the CLASSPATH you will need to include the name of the jar file at the end of the path, for example if you have two jars in /usr/local/lib called aa.jar and bb.jar respectively that you want your JVM to have access to, your CLASSPATH will need to be set somthing like the following(done here in the style of your existing .profile) :
CLASSPATH=/usr/local/lib/aa.jar:/usr/local/lib/bb.jar
export CLASSPATH
 
Saloon Keeper
Posts: 22646
153
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Many complex java systems such as Tomcat have an infrastructure of some sort to add multiple JARs to the classpath. They'll either have specially-designated directories where startup scans for jars to add or there will be a script (frequently named bin/setenv) to run before starting the process.
 
I will open the floodgates of his own worst nightmare! All in a tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic