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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

urgent

Status
Not open for further replies.

tejaspillai

Programmer
Joined
Dec 17, 2000
Messages
4
Location
US
hi,
i have joined this forum today.
could anyone tell me the advantage/disadvantages of using RMI.
when i am trying to convert an existing standalone rmi-application to an applet, i am facing problem while running in IE. but i t's working properly in appletviewer.

what should i do in order to work with IE 5.0.
waiting for reply
Tejas
 
Its probably that your applet is using the IE Microsoft runtime files not the Sun version. Under this post you will see a link
Check out the FAQ
area for this forum!
go their and their is a FAQ on how to get around this....

later
 
hi ackka,

thanks for your kindly reponse.
i have just read your reply. i will get in touch with you
as soon as i implement it.
will it run with applet using rmi.
i am getting exception when working with ie 5.0: java.rmi.remote
not found.
if u need more explanation i will mail the code to u shortly

bye

Tejas Pillai
(India)
 
hi ackka,
this is the rmi applet code :
-----------------
interface:
import java.rmi.*;

public interface AppletMess extends Remote
{
public String appletMessage() throws RemoteException;
}
----------------------
implementation class:
import java.rmi.*;
import java.rmi.server.*;

public class AppletMessImp extends UnicastRemoteObject implements AppletMess
{
public AppletMessImp() throws RemoteException
{
super();
}

public String appletMessage() throws RemoteException
{
return "Hello, Object One Welcome's You";
}

}
----------------------------
Server :
import java.io.*;
import java.rmi.*;
import java.rmi.server.*;
public class AppletMessServer
{
public static void main(String args[])
{
//System.setSecurityManager(new RMISecurityManager());
try
{
AppletMess sobj= new AppletMessImp();
System.out.println("main");
Naming.bind("asit", sobj);
System.out.println("Remote Object bound in registry");
}
catch(Exception ee)
{
System.out.println("Implimentation error:"+ee.getMessage());
ee.printStackTrace();
}
}
}
------------------------
Client applet : this is giving problem while running in
ie 5.0
i have also downloaded plugin from sun site.
this code works fine with appletviewer .

import java.applet.*;
import java.awt.*;
import java.rmi.*;
public class AppClient extends Applet
{
// <Applet name =&quot;AppClient&quot; code=&quot;AppClient&quot; width=&quot;400&quot; height=&quot;400&quot;> </Applet>
String res=&quot;&quot;;
public void init()
{
System.out.println(&quot;lookup start&quot;);

//System.setSecurityManager(new RMISecurityManager());
try
{

AppletMess cobj = //(AppletMess)Naming.lookup(&quot;server&quot;);
(AppletMess)Naming.lookup(&quot;asit&quot;);
System.out.println(&quot;lookup over &quot;);
res=cobj.appletMessage();
repaint();
}
-------------------------------------------------
HTML client:

<html>
<body>
<applet code=&quot;AppClient&quot; name=&quot;AppClient&quot; width=&quot;400&quot; height=&quot;400&quot;>
</applet>
</body>
</html>

-----------------------------------------
pl guide me.
waiting for ypur mail

Tejas





 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top