File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes newbie question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "newbie question" Watch "newbie question" New topic

newbie question

ketandba shah

Joined: Feb 05, 2005
Posts: 22
i am new to java.

on linux server I have installed

1) java(jdk1.5.0/jre)
where JAVA_HOME = /usr/local/lib/jdk.
2) jboss and Tomcat .
3) created and build Berkeley db 2.0.9

on development computer on windows xp i have installed

1)java(jdk1.5.0/jre) on .
where JAVA_HOME=C:\Program Files\Java\jdk1.5.0
2) eclipse3.0 IDE.
i have created java project on developer m/c..
created some java class under some package in this java project.

Now for compile and run java program i have to include some jar file which lies on linux server. i have successfuly included jar file and my compilation is through.

while running the program from development computer, i am getting error...

Exception in thread "main" java.lang.UnsatisfiedLinkError: no libdb_java43 in java.library.path

Actually libdb_java43 is shared library...and Berkeley db documentation say that ,you have to include this shared library where you run your program..

I have confusion that where my program is running...
It is on windows or on linux.......?

because on both(windows/linux) computer i have installed java.

my aim is to run the java program on linux server and i am giving the Run java program command from my windows computer.

how i set the class path or some other setting to fulfil my requirement.

what is the setting on windows and linux server...

pl. replay me..i have spent complete 2 days for this problem

Thanks in advanced and your help is appriciated....

Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Looks like you will need that db jar in your classpath on any computer you run on. It will perform best if you copy it onto the local disk. On Windows machines I often make batch files like this:

You can use the -cp argument instead. I'll trust you know how to do similar things on Linux. Let us know if that helps.

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
ketandba shah

Joined: Feb 05, 2005
Posts: 22
Thanks stan james for replay...

but this is client/server application. I have to run this program on linux server by giving command for run the java program from windows m/c.

i.e. my aim is to run the program on server, give run command from windows m/c for that reason i have given details of JAVA_HOME on both plateform.

i am understanding that, i have to set the PATH, CLASSPATH variable which link the linux server....but how and where to set this..(on windows or linux)?

pl. replay
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
Personally, I wouldn't consider this a "beginner" question even if you consider yourself a newbie. Mostly this is because I consider myself an intermediate Java programmer and I still have no idea how to answer your question. You should consider posting this to at least the intermediate forum, and personally, I think it would be more suited for the advanced forum. Better yet, we also have forums on Distributed Java, Sockets and Internet Protocols, Servlets, and JSP. This would probably be more on-topic in one of these more specific forums. If none of these fit what you are doing, then check out the index for other message boards that are available.


[ March 31, 2005: Message edited by: Layne Lund ]

Java API Documentation
The Java Tutorial
Joel McNary

Joined: Aug 20, 2001
Posts: 1824

This does look more advance for beginners, so I'll move this to the intermediate forum.

I think that the real question here is how are you planning on accessing the database? Is the client going to have direct access to the database, or is it just the sever? If its just the server, then you can add the .so to the PATH and everything should work (the JVM loads shared libraries from the path, not the CLASSPATH).

If the client is going to have direct access to the database (and not send all requests to the server) then you will have to find a .dll for the db and add that to the PATH on the client (which, depending on who the client is, you may not be able to do! Will you have control over how the clients are set up?)

You may want to consider other databases, such as MySQL and/or HSQL, which have pure Java drivers.

(If the .so is not for the driver but rather for the database itself, then there should be no problem; the client doesn't run the database! ...unless you're using HSQL...)

Anyway, I think that we don't quite have enough information to answer this question adequately. Poke through my answers and see if you can provide a bit more information to help us get in the right direction.

Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
I agree. Here's the link:
subject: newbie question