H Padia

Greenhorn
+ Follow
since Nov 18, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by H Padia

Hello Raghda,

I am facing the same problem as you did.

I know its been a while now, but would you remember how you solved the problem?

Thanks.

H
10 years ago
Hello Rob,

Your post helped me through.

10 years ago
I have a JNI method to access java method which returns an Integer object. I do not want to return the primitive int type because this code will be modified to handle Generic objects. The following is what I have. I am not able to get the value of the Integer that I pass. The output at C++ side is something like


How can I get the actual value of Integer object that I pass, at the C++ end?

Please help.

Thanks,

-H

GenericPeer.cpp



GenericPeer.java


Data.java



Test.java (Main class)


10 years ago
Hello,

I am creating a named pipe using JNI by calling the mkfifo() command. I am using mode = 666.

I am then trying to write into the pipe using Java, but I get stuck while writing into the pipe. I get stuck at the following line and not able to go past it. I am not getting any error either.



Please help.

Regards,

-H

PipePeer.java



PipeImplement.java



10 years ago
Hello,

I am getting the following error. Please advide where I may be going wrong.

Exception in thread "main" java.lang.UnsatisfiedLinkError: Plcio.open(Ljava/lang/String;)I
at Plcio.open(Native Method)
at Plcio.main(Plcio.java:11)


Plcio.java


Plc.h



Plc.cpp




Regards,

-H
10 years ago
Hello K!

It works now. I made the following changes in the Client class:


In the Server class Line 18 "Services" is a name associate with the remote reference, 'stub' in my case. While the "ServerMc" in line 7 of Client class is the name of the Server Machine in my /etc/hosts.
11 years ago
Hello K!
Thank you for your post. The Server seems to work fine. The following is my code for server.

11 years ago
Hello,

I am trying to create an RMI. I am getting " java.rmi.NotBoundException " error. I am sure that the firewall on server side and the client side are turned off. Also, the /etc/hosts file contain the correct IP address of the server machine.

The following is the code at the client end:




The following is the stact trace:

Client exception: java.rmi.NotBoundException: rmi://ServerMc:1099/Services
java.rmi.NotBoundException: rmi://ServerMc:1099/Services
at sun.rmi.registry.RegistryImpl.lookup(Unknown Source)
at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
at sun.rmi.server.UnicastServerRef.oldDispatch(Unknown Source)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:273)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:251)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:377)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at client.Client.main(Client.java:29)


I tried going through a few forums, but not of much luck.

Your help will be appreciated.

Thank you.

-H
11 years ago