Naty wills

Greenhorn
+ Follow
since Sep 20, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Naty wills

Thanks for the Suggestions
16 years ago
Hi,
I have a doubt in using a temporary variable defined inside a method.
I am defining a temporay String object inside my method and initializing with the value returned from a called function and then again I am using it as parameter in my another calling function. Will be there any performance issues?? Whats the best of doing it. Should I use temporary variable or not?
Example ::

String temp = object.generateMapping(map);
object1.addValues(temp);

any suggestions are welcomed
16 years ago
Thanks all of you :-)

Regards
~Naty
17 years ago
Hi,
I have a query regarding Exceptions in Java, as there are 2 types of exceptions in Java - Checked and Unchecked exceptions, but in other languages viz C++ there is only Unchecked exception. Can someone help me whats the advantage in using Checked and Unchecked exceptions. Why not there is not only Checked exceptions or Unchecked exceptions in Java? Why java supports both Checked and Unchecked exceptions?

Regards
Naty
17 years ago
Hi ,
Thanks for replies..
I was just thinking that use of Final Keyword violates the OOPS concept specially Inheritance. So whether we should use this or not?
18 years ago
Hi all,
It is always be suggested that "Avoid the use of Final Keyword" while designing a software.
Can somebody explains me why is it so??

Thanks
Naty
18 years ago
Thanks a lot for prompt answers..
Now all my doubts are cleared..
18 years ago
Hi all,
I am confused abt the use of Final and private keyword in java.
Are both use to prevent overridding??
18 years ago
Thanks stefan
19 years ago
Hi,
I am trying to install Eclipse on ReD hat linux 9 it get installed but i dont know how to run it.Can anybody help me out.
--Naty
19 years ago
Thanks Nate.
Code is running now..
19 years ago
Thanks Nate,
Now code is running.

Naty
19 years ago
Thanks Nate,
Now code is running.

Naty
19 years ago
Thanks Nate,
I am new in JAVA RMI. I check the rmiregistry,its running. I had set security policy file also.The Above mention problem is occuring when I an trying to run Server machine. I am using same Linux machine for both server and Client.
The exceptions while running the above code are:
java.net.UnknownHostException:
at 0x40268e17: java.lang.Throwable.Throwable(java.lang.String) (/usr/lib/./libgcj.so.3)
at 0x4025bcd2: java.lang.Exception.Exception(java.lang.String) (/usr/lib/./libgcj.so.3)
at 0x4026fbce: java.io.IOException.IOException(java.lang.String) (/usr/lib/./libgcj.so.3)
at 0x402f3d2a: java.net.UnknownHostException.UnknownHostException(java.lang.String) (/usr/lib/./libgcj.so.3)
at 0x40253f22: java.net.InetAddress.lookup(java.lang.String, java.net.InetAddress, boolean) (/usr/lib/./libgcj.
so.3)
at 0x402ed8ca: java.net.InetAddress.getByName(java.lang.String) (/usr/lib/./libgcj.so.3)
at 0x402ef323: java.net.Socket.Socket(java.lang.String, int) (/usr/lib/./libgcj.so.3)
at 0x40320b96: gnu.java.rmi.server.RMIDefaultSocketFactory.createSocket(java.lang.String, int) (/usr/lib/./libg
cj.so.3)
at 0x40321753: gnu.java.rmi.server.UnicastConnectionManager.getClientConnection() (/usr/lib/./libgcj.so.3)
at 0x403216a4: gnu.java.rmi.server.UnicastConnectionManager.getConnection() (/usr/lib/./libgcj.so.3)
at 0x40321adc: gnu.java.rmi.server.UnicastRef.invokeCommon(java.rmi.Remote, java.lang.reflect.Method, java.lang
.Object[], int, long) (/usr/lib/./libgcj.so.3)
at 0x40321aa8: gnu.java.rmi.server.UnicastRef.invoke(java.rmi.Remote, java.lang.reflect.Method, java.lang.Objec
t[], long) (/usr/lib/./libgcj.so.3)
at 0x4031a820: gnu.java.rmi.registry.RegistryImpl_Stub.rebind(java.lang.String, java.rmi.Remote) (/usr/lib/./li
bgcj.so.3)
at 0x40315a42: java.rmi.Naming.rebind(java.lang.String, java.rmi.Remote) (/usr/lib/./libgcj.so.3)
at 0x403831e7: ffi_call_SYSV (/usr/lib/./libgcj.so.3)
at 0x403831a7: ffi_raw_call (/usr/lib/./libgcj.so.3)
at 0x402306e8: _Jv_InterpMethod.continue1(_Jv_InterpMethodInvocation) (/usr/lib/./libgcj.so.3)
at 0x40230ff4: _Jv_InterpMethod.run(ffi_cif, void, ffi_raw, _Jv_InterpMethodInvocation) (/usr/lib/./libgcj.so.3
)
at 0x4022e504: _Jv_InterpMethod.run_normal(ffi_cif, void, ffi_raw, void) (/usr/lib/./libgcj.so.3)
at 0x4038305c: ?? (??:0)
at 0x40242dd8: gnu.gcj.runtime.FirstThread.call_main() (/usr/lib/./libgcj.so.3)
at 0x402ad02d: gnu.gcj.runtime.FirstThread.run() (/usr/lib/./libgcj.so.3)
at 0x4024fc4c: _Jv_ThreadRun(java.lang.Thread) (/usr/lib/./libgcj.so.3)
at 0x4021c8ac: _Jv_RunMain(java.lang.Class, byte const, int, byte const, boolean) (/usr/lib/./libgcj.so.3)
at 0x08048910: ?? (??:0)
at 0x42015574: __libc_start_main (/lib/tls/libc.so.6)
at 0x080486c1: ?? (??:0)
java.net.UnknownHostException:
at 0x40268e17: java.lang.Throwable.Throwable(java.lang.String) (/usr/lib/./libgcj.so.3)
at 0x4025bcd2: java.lang.Exception.Exception(java.lang.String) (/usr/lib/./libgcj.so.3)
at 0x4026fbce: java.io.IOException.IOException(java.lang.String) (/usr/lib/./libgcj.so.3)
at 0x402f3d2a: java.net.UnknownHostException.UnknownHostException(java.lang.String) (/usr/lib/./libgcj.so.3)
at 0x40253f22: java.net.InetAddress.lookup(java.lang.String, java.net.InetAddress, boolean) (/usr/lib/./libgcj.
so.3)
at 0x402ed8ca: java.net.InetAddress.getByName(java.lang.String) (/usr/lib/./libgcj.so.3)
at 0x402ef323: java.net.Socket.Socket(java.lang.String, int) (/usr/lib/./libgcj.so.3)
at 0x40320b96: gnu.java.rmi.server.RMIDefaultSocketFactory.createSocket(java.lang.String, int) (/usr/lib/./libg
cj.so.3)
at 0x40321753: gnu.java.rmi.server.UnicastConnectionManager.getClientConnection() (/usr/lib/./libgcj.so.3)
at 0x403216a4: gnu.java.rmi.server.UnicastConnectionManager.getConnection() (/usr/lib/./libgcj.so.3)
at 0x40321adc: gnu.java.rmi.server.UnicastRef.invokeCommon(java.rmi.Remote, java.lang.reflect.Method, java.lang
.Object[], int, long) (/usr/lib/./libgcj.so.3)

Any Help would be Appreciated
Naty!!!
19 years ago
Hi,
I am having problem in my RMI server. I am using red hat linux 9 with Jdk1.5.
Code is like this
import java.rmi.*;
import java.net.*;
public class AddServer {
public static void main(String args[]) {
try{
System.setSecurityManager(new RMISecurityManager());
System.out.println("server is ready");
AddServerImpl addServerImpl = new AddServerImpl();
Naming.rebind("AddServer", addServerImpl);
System.out.println("AddServer is ready now");
}

catch(Exception e){
System.out.println("Exception: " +e);


Error is this:
Exception: java.rmi.RemoteException: connection failed to host: ; nested exception is:

Any Help would be appreciated
19 years ago