• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

IBM toolbox for JAVA

 
Sulbha Jan
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am new to this JDBC stuff and IBM toolbox for Java.
I want to access files sitting on the server (AS/400) from my workstation.
I do see that the toolbox is installed on AS/400.
Now if I want to run a simple java program which will read a file on AS/400
how will I do that ? I want to use JDBC in this case.
Please guide me through or let me know the possible links where I can get step by step instruction for the same.
Thanks much

--Sulbha
 
Mala Sharma
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sulbha,

If you haven't, download IBM toolkit(google for it) that contains the driver and necessary classes to connect to AS400. then you 'll need to import:

that contains the driver classes so, in your connection just register the driver by:

This will give you JDBC connection to AS400. Hope that helps.

Mala
 
Sulbha Jan
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the toolbox is installed on the AS/400 then can I use the classes defined in the toolbox without needing to install the toolbox on the client machine (my workstation)?

Thanks again
 
Mala Sharma
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're going to run in on your client machine, then yes it should be there. In a nutshell, it should be in a classpath where you want to compile and deploy it. Maybe, someone else can clarify if my understanding is right.

Mala
 
Sulbha Jan
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cant I set set the classpath to point to the toolbox on AS/400?
That ways I need not always install the toolbox on the client.
 
Sulbha Jan
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok for now I have installed the toolbox on my workstation.

I am getting the following error


Code snippet:

I have set the classpath to point to the correct destination for my jt400.jar on my workstation.
I am going nuts resolving this.
Please help me !

Thanks

[ October 15, 2005: Message edited by: Sulbha Jan ]
[ October 15, 2005: Message edited by: Sulbha Jan ]
 
Bruce Jin
Ranch Hand
Posts: 672
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to make sure the file jt400.jar is in your classpath. This file contains jdbc driver for as400/db2.
 
Sulbha Jan
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply.

Following steps are taken before i compile my java pgm

path = c:\program files\java\jdk1.5.0\bin - This is done to access java classes.

set classpath = .;c:\folder1\folder2\jt400.jar

Now when i compile the program it gives me the following error.
package com.ibm.as400.access does not exist.

What am I missing here ?
Thanks
 
Sulbha Jan
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I could at least compile and run my java application but eachtime i have to specify the classpath for jt400.jar file explicitly (while compiling and running) on my DOS prompt.
Can anybody please please explain why my set classpath command doesn't work?
After running the above command when i type echo %CLASSPATH% it gives me the same text i.e
%CLASSPATH%.
I have tried all sorts of methods I can think of like-
I also created a user defined environment variable on my workstation with the path for jt400.jar file but of no avail.
I am totally confused now why doesnt this work.
Please can anyone solve my doubt. My last post was inactive for quite a while.
Please let me know where am i going wrong?

Thanks

[ October 25, 2005: Message edited by: Sulbha Jan ]
[ October 25, 2005: Message edited by: Sulbha Jan ]
 
Sulbha Jan
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,
Although the heading of this thread is :IBM toolbox for java, but the doubt in my prev post is not related to it, at all.
Mr Moderator: Is this post in an incorrect forum? or is my doubt too basic to be considered answerable by anyone?
Please let me know where am i going wrong? I am desperately waiting for anyone to show the correct way of doing it.
Help is greatly appreciated.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34863
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Sulbha Jan:
Hello All,
Although the heading of this thread is :IBM toolbox for java, but the doubt in my prev post is not related to it, at all.
Mr Moderator: Is this post in an incorrect forum? or is my doubt too basic to be considered answerable by anyone?
Please let me know where am i going wrong? I am desperately waiting for anyone to show the correct way of doing it.
Help is greatly appreciated.


Sulbha,
The beginning of the post was about the IBM toolbox, so it is a good subject. The previous post (about classpaths) is really an offshoot. Sometimes questions evolve

While the post isn't in the wrong forum, it would be better answered in Java In General (Beginner.) Those folks have more practice with DOS. I recommend reposting just the classpath question there.

No question is too basic for JavaRanch. At first glance your configuration looks right to me. It's been a while since I've used DOS though.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic