• 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Configuring Classpath on IBM i (AS400) server

 
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am trying to setup our IBM i server to connect to an SQL server. The necessary .JAR driver file has been downloaded an uploaded to the server. We have been following these instructions.

Now we are trying to set the classpath environment variable. It currently looks as below:

 

The jar file is at location  /java/jdbc/jtds-1.3.1.jar. It seems all i need to do is append this to the classpath string. However, I am confused that there is an extra period ('.') at the end of the string following 'jar:'

Is it really necessary or was it inserted by mistake? Please advise how i can add this jar file to the class path.

There are other java stuff running on the server and I absolutely cannot afford to mess up anything. I know even the slightest change to the classpath can blow up things.

 
Marshal
Posts: 25798
69
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The "." which confuses you means "the current working directory". And the classpath entries are separated by colons in that shell, although I expect you knew that already. So to add your jar to that classpath, you append a separator (colon) and then the path to the new jar. Which is probably what you had in mind already.

Although you might want to keep the "." entry at the end, so that it doesn't get obscured. It would be hard to notice if it were in the middle of the classpath. Or better still, move it to the beginning.
 
Destroy anything that stands in your way. Except this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic