It's not a secret anymore!
The moose likes Websphere and the fly likes RunTime Error While Running Client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "RunTime Error While Running Client" Watch "RunTime Error While Running Client" New topic

RunTime Error While Running Client

satish kumar g

Joined: Apr 25, 2001
Posts: 5
hai Rahul,
After setting the classpath to jndi.jar in jdk folder my client program got compiled.
Now i am getting a run time exception at InitialContext ctx=new InitialContext(var)it is giving the run time error while creating the InitialContext
My Client Program is like this
import java.util.*;
import javax.naming.*;
import sat.*;
public class MyHelloClient{
public static void main(String[] args){
InitialContext ctx = null;
Properties env = System.getProperties();
env.put(Context.PROVIDER_URL, "iiop://localhost:900");
System.out.println("upto here");
ctx = new InitialContext(env);
System.out.println("upto here1");
Object homeObject = ctx.lookup("MyHello");
System.out.println("upto here2");
MyHelloHome incHome=(MyHelloHome)homeObject;
MyHello incHello=incHome.create();
String s=incHello.sayHello();
}catch ( Exception e )
it is printing "upto here" at the console but "upto here1" is not coming it means that the error is while creating the InitialContext.or Is there anything wrong in my client program.
So what i need to do then.
kindly help me as i strucked at this point.
I agree. Here's the link:
subject: RunTime Error While Running Client
It's not a secret anymore!