..however, it doesn't work if the Client and Server are two different applications. I get Exception in thread "main" java.lang.ClassCastException: class com.sun.proxy.$Proxy0 cannot be cast to class com.whateverpackage.RemoteInterface..
works locally but when i use it on my server it throws: ApplicationServer.java:11: error: cannot find symbol registry.rebind("hello", new HelloServant()); ^ symbol: class HelloServant location: class ApplicationServer 1 error
When you run it from client machine with "java" command you should also add -CLASSPATH wich leads to HelloServant class (HelloServant.class should be present on client machine) So it will be like this (run from client cmd): java -cp HelloServant;. ApplicationServer
Awesome. I've been reading for a bit and ended up using the old method of rmiregistry [Port##] and then I found your video. Decent.
hello! Can you send me the code please?
Thank you some much, you helped me more than stack overflow.
Excellent .. your video helped me a lot. thank you thank you ..
Thank you, helped me very !!!
You are a legend! Cheers!
what the software did you use?
Java + NetBeans :-)
absolute legend
Very help, yes, nice!
What is must be changed if it wasn't a localhost?
my client is a on a virtual machine and my server is on my actual pc.
I got confused.
koki mqrs You have to change the hostname in the lookup string in the client.
So easy, brief thanks (y)
thank u so much Sir!
..however, it doesn't work if the Client and Server are two different applications. I get Exception in thread "main" java.lang.ClassCastException: class com.sun.proxy.$Proxy0 cannot be cast to class com.whateverpackage.RemoteInterface..
Giorgi Tsiklauri Of course it works. Your problem is probably because you changed the package of the interface. Solution: don't.
cool stuff!!!
works locally but when i use it on my server it throws:
ApplicationServer.java:11: error: cannot find symbol
registry.rebind("hello", new HelloServant());
^
symbol: class HelloServant
location: class ApplicationServer
1 error
When you run it from client machine with "java" command you should also add -CLASSPATH wich leads to HelloServant class (HelloServant.class should be present on client machine)
So it will be like this (run from client cmd): java -cp HelloServant;. ApplicationServer
Thanks a lot :D
Provide the Code Buddy
what is the programme used to do all these?
It's an application called Netbeans used primarily for java programming, it works with JDK and it is free to download
@@seanmthembu979 so you using apache netbeans?
No just the netbeans, not apache netbeans.org/projects/www/
whats ur IDE
thx...