• 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 ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

newbie question

Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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....

(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
ketandba shah
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
Posts: 1840
Eclipse IDE Ruby Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Hey cool! They got a blimp! But I have a tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic