Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

newbie question

Status
Not open for further replies.

ketandba

Programmer
Nov 15, 2004
38
0
0
US
hi,
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....

ketan
 
To call one java program on one m/c from another java program on another m/c you'll have to use some form of remoting, such as sockets, RMI or http (via Tomcat for example).
 
thanks timw,
for replay..

But my problem is not like you mention...

I have stored and compile my java program on windows m/c. and run this program on linux server but i am giving command for run the same java program from windows m/c..

in short enter run java program command from windows and this program actually running on linux server ...(client/server application)

ketan
 
But that is exactly what I'm talking about..
Client / Server is where one program (the client) makes a call to a method on another program (the server).

It doesn't really matter what languages are involved, to do this you need to do some kind of remoting, whether that is done by yourself or handled by some software in the OS (Terminal Services springs to mind).

In Java, if you have two java programs running in separate JVMs, whether on the same machine or on different machines, you use a remoting technology (such as those I mentioned in my previous reply) to allow one program to 'talk' to the other.
 
What is "m/c"?

Anyway, Java is cross-platform only if you code it to be. If you use native resources, it won't.

Anyway, in this case I think you are missing the path of that library on the java.library.path.

Cheers,

Dian
 
hi thanks timw/Dian.... for replay....

dian,
m/c = machine

output of
System.out.println(System.getProperties().get("java.library.path"));

C:\Program Files\Java\jre1.5.0\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Adaptec Shared\System;C:\Program Files\Java\jdk1.5.0\bin;Y:\install\lib\libdb_java-4.3.so


where Y: is map to linux server and libdb_java-4.3.so resides in Y:\install\lib\libdb_java-4.3.so

which is the shared library....

Actually on run time it will search for libdb_java-43.dll

that means program is running on windows insted of linux... and libdb_java-43.dll not exist on windows.

how i can run this program on linux (by entering run command from windows m/c)

for both m/c i have given JAVA_HOME...

pl. repaly..

thanks
 
If you want to run a Java program from another Java program in another m/c you need RMI.

java.sun.com/docs/books/tutorial/rmi

I you just want to run a Java program from a windows m/c, use telnet.

Cheers,

Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top