Rmi applet , browser

hi~
i have a rmi applet
when i run the applet (use appletviewer) is ok
but it's on bowser , can't work
can anynoe tell me maybe what's problem
how can i do
thanks

security restriction is probably the problem. Try signing the applet or write a policy file and send it with the other files in the client's package for rmi

Similar Messages

  • Please help me regarding RMI Applet Application?

    Hi Friends..
    Please help me describe the work-flow of RMI Applet Application..
    Currently, i use Java Card 2.2.1.. In the package Java Card 2.2.1 there's an example of RMI Applet Application..
    in that RMI Applet Application there are 3 Java files, namely :
    1. public interface Purse extends Remote
    2. public class PurseImpl extends CardRemoteObject implements Purse
    3. public class PurseApplet extends Applet
    There's also RMIDemo.opt file.. and in the contain of that RMIDemo.opt file, there's only PurseApplet class that would be converted to CAP file..
    so, what is the use of Purse Interface and PurseImp class?.. and how to use both of them?..
    Please help me regarding this..
    Thanks in advance..

    Hi Shane, thanks for clarifying that.. :).. Ok. i'm going to learn hard..
    Sorry, i've a doubt regarding this thread ..
    In that thread, that's mentioned purse.jar containing :
    - Purse.class
    - PurseApplet.class
    - PurseImpl_Stub.class
    - PurseImpl.class
    The only class that i'm wondering is PurseImpl_Stub.class..
    Why this class required, whereas i don't found it in the RMIDemo application that shipped with JCDK 2.2.1, and JCDK 2.2.2 as well..
    I've tried to create other Java Card RMI Application, but it requires the "Stub" class..
    Here's the error message :
    java.rmi.StubNotFoundException: com.latihan.rmi.DataMahasiswaImpl_Stub
         at com.sun.javacard.ocfrmiclientimpl.JCCardObjectFactory.getRemoteObject(Unknown Source)
         at com.sun.javacard.javax.smartcard.rmiclient.CardObjectFactory.getObject(Unknown Source)
         at com.sun.javacard.javax.smartcard.rmiclient.JavaCardRMIConnect.getInitialReference(Unknown Source)
         at testRMIClient.DataMahasiswaClient.main(DataMahasiswaClient.java:43)How to create and what's the contain of that "Stub" class?..
    Can i know the source code of PurseImpl_Stub.java file?..
    Thanks in advance..
    Edited by: Leonardo_Carreira on Apr 13, 2010 8:27 PM

  • Problem of running rmi applet and client for Javacard 3.0.2 Connected

    Need help for running rmi application for Java Card 3.0.2 connected version. I am trying to move a working rmi applet & client from 3.0.2 Classic version to Connected version. Then I found that they are so different and I have no idea how to run my application :(
    Here are what I have done:
    - I have modified the Classic HelloWorld applet to an rmi applet. It is OK when I build and run the application in netbeans. The Applet can be selected successfully.
    My problems are:
    - How to connect a rmi client to the rmi applet? Here are what I have done:
    + Run rmi applet in netbeans
    + Run 'rmic' command to generate stub
    + Run rmiregistry outside of netbeans
    + Build and run rmi client application outside of netbeans by typing "ant all"
    However, the rmi client was not able to connect to the applet:
    [java] java.net.ConnectException: Connection refused: connect
    Would this be a problem of netbeans? Could someone tell me how to run rmi applet/client within or outside netbeans. Thanks a lot!

    Well finally I figured out that CREF-emulators (from JCDK 2.2.1, 2.2.2, 3.0.1 classic) do not support cryptographic extensions at all.
    BUT JCWDE(from JCDK 2.2.1, 2.2.2) - support, but this kind of simulator quite hard to use, because it does not have state between launches.
    About CJCRE(from JCDK 3.0.1 connected) - still don't know, seems not support cryptographic extensions.

  • RMI Applet error

    I'm programming a RMI based messenger system. I tested the server and a java console client... all worked very well!
    After that, I programmed a very simple test applet (source below).
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import java.rmi.*;
    import java.rmi.server.*;
    public class MessageApplet extends Applet {
         private MessageDaemon messaged;
         public MessageApplet() {}
         public void init() {
              try {
                   // connect RMI Server
                   messaged = (MessageDaemon)Naming.lookup("rmi://myhost.net/messaged");
    // RMI test
                   System.out.println(messaged.whois("username").getName());
              catch (Exception e) {
                   e.printStackTrace();
    I start the applet under Windows 98 (JDK 1.3.1) with the following command:
    appletviewer MessageApplet.html
    and all I get is the following exception:
    java.security.AccessControlException: access denied (java.net.SocketPermission myhost.net resolve)
    at java.security.AccessControlContext.checkPermission(Compiled Code)
    at java.security.AccessController.checkPermission(Compiled Code)
    at java.lang.SecurityManager.checkPermission(Compiled Code)
    at java.lang.SecurityManager.checkConnect(SecurityManager.java:1004)
    at java.net.InetAddress.getAllByName0(Compiled Code)
    at java.net.InetAddress.getAllByName0(InetAddress.java:544)
    at java.net.InetAddress.getByName(Compiled Code)
    at java.net.Socket.<init>(Socket.java:98)
    at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirect SocketFactory.java:29)
    at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Compiled Code)
    at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:462)
    at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:194)
    at sun.rmi.transport.tcp.TCPChannel.newConnection(Compiled Code)
    at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:306)
    at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
    at java.rmi.Naming.lookup(Naming.java:89)
    at MessageApplet.init(MessageApplet.java:27)
    at sun.applet.AppletPanel.run(Compiled Code)
    at java.lang.Thread.run(Thread.java:479)
    If I run the same applet unter MRJ (Mac OS Runtime for Java, JDK 1.1.8, Apple Applet Runner) on my Mac, I get another exception:
    java.rmi.UnmarshalException: Return value class not found; nested exception is: java.lang.ClassNotFoundException: MessageDaemonImpl_Stub
    at sun.rmi.registry.RegistryImpl_Stub.lookup(RegistryImpl_Stub.java)
    at java.rmi.Naming.lookup(Naming.java)
    at MessageApplet.init(MessageApplet.java:27)
    at com.apple.mrj.JManager.JMAppletViewer_OLD.doAppletInit(JMAppletViewerOld.java)
    at com.apple.mrj.JManager.JMAppletViewer_OLD.setState(JMAppletViewerOld.java)
    at com.apple.mrj.JManager.JMViewerEvent.post(JMAppletViewerOld.java)
    at com.apple.mrj.JManager.AVDispatcherThread.run(JMAppletViewerOld.java)
    What could be the problem? Do I have to add some permissions? The client could load the MessageDaemonImpl_Stub class without any problems, so there is surely no problem with the server/rmiregistry.
    Thank you very much.
    Best Regards,
    Adrian R.

    some additional information:
    I started the applet with appletviewer (1.3.1) under Windows...
    appletviewer http://192.168.0.1/msg/MessageApplet.html
    (no problems)
    appletviewer http://myhost.net/msg/MessageApplet.html
    (security exception allthough myhost.net is the same host as 192.168.0.1!)
    The server ist running on a linux system with 2 network interfaces: LAN: 192.168.0.1 and WAN: (DHCP, dynamically linked to a DNS). I'm testing the applet from a host in the LAN and only the url http://192.168.0.1/msg/MessageApplet.html did work.
    I also tested the applet with MS IE 6 and all I got is the following exception:
    java.lang.ClassNotFoundException: java.rmi.Naming
    on my Mac I tested the applet in MS IE 5 and it worked with the URL: http://192.168.0.1/msg/MessageApplet.html but http://myhost.net/msg/MessageApplet.html didn't work.
    What about IE 6? Is it possible that IE doesn't support RMI?!?! But what to do? And how can I solve the problem regarding "IP vs. DNS"?
    Best Regards
    Adrian R.

  • Applet-Browser communication

    I have an applet that runs inside one frame of a two frame browser window. As far as I can tell from the JDK documentation, the only way an applet can interact with the browser is the requests for displaying particular pages e.g.using the showDocument() method in the AppletContext interface class.
    What I want to be able to do is to highlight particular text in the browser frame from the applet. Is this possible? Does anyone know of anyone free libraries that have implemented such functionality?
    Any ideas appreciated.

    I don't think that's possible.
    but if the HTML-pages are simple (no scripting, no frames etc..) you
    can use JEditorPane to show the HTML-pages instead of the browser and you have all the control you wish.

  • The Security Problem of RMI-Applet?

    Hi,
    I used jdk1.3, Apache Jserv as the environments.
    Then I downloaded helloWorld sample from java.
    sun.com and wanted to make it work in Java Applet.
    It runs ok with HelloClient.java. However, there are
    errors when with HelloApplet.java:
    HelloApplet execption: access denied(java.net.SocketPermission
    128.104.179.36:1099 connect,resolve)...
    I ran server program as:
    java -Djava.rmi.server.codebase=http://128.104.179.36/myclasses/
    -Djava.security.policy=e:/policy examples.hello.HelloImpl
    And I copied all classes into the directory of myclasses.
    Here is my e:\policy :
    grant {
    // Allow everything for now
    permission java.security.AllPermission;
    permission java.net.SocketPermission "128.104.179.36:1099",
    "connect,accept,resolve";
    And in jserv.properties, I added
    java.rmi.server.codebase=e:\its817\Apache\Apache\htdocs\myclasses\
    Can anyone tell me what is the problem?
    Thanks very much!

    For applets you need also a policy file.
    It have to be named .java.policy and be stored in your Home Directory:
    C:\Windows\Profiles\<yourName>\.java.policy.
    Regards,
    Geri

  • Rmi + applet closing problem

    I am running a client server application .
    I need to close an applet(client) fro mthe server .
    is this podssible or does it cause security problems?/?
    without javascript please .
    Is it also possible to just convert my applet into a frame , this will allow
    me to close the frame fro mthe server(syste.exit(0) but might
    have security problems which th aplpe tdoes not have ??
    any ideas??

    An applet can only be closed by a browser when the user moves away from the document that contains the applet or when the browser is closed.
    V.V.

  • RMI+Applet+java.lang.UnsatisfiedLinkError

    Hello!
    guys I REALLY need Your help!!!!
    I have the following problem:
    I'd like to use RMI in Java Applet. When I test applet in JBuilder
    everything works fine. But when I try to open the same applet in IE it
    doesnt load and in Java Console I can see the following exception:
    java.lang.UnsatisfiedLinkError:
    java/security/AccessController.doPrivileged Possible causes: If you are
    trying to use J/Direct (@dll.import), check
    your compiler version (for JVC, requires 4336 or greater.) If you are trying
    to use RNI, there are new requirements: see documentation.
    at java/security/AccessController.doPrivileged
    at sun/rmi/server/RemoteProxy.getLogLevel
    at sun/rmi/server/RemoteProxy.<clinit>
    at sun/rmi/server/RemoteProxy.getStub
    at java/rmi/registry/LocateRegistry.getRegistry
    at java/rmi/registry/LocateRegistry.getRegistry
    at java/rmi/Naming.getRegistry
    at java/rmi/Naming.lookup
    at ServerSide/Control.jbInit
    at ServerSide/Control.init
    at com/ms/applet/AppletPanel.securedCall0
    at com/ms/applet/AppletPanel.securedCall
    at com/ms/applet/AppletPanel.processSentEvent
    at com/ms/applet/AppletPanel.processSentEvent
    at com/ms/applet/AppletPanel.run
    at java/lang/Thread.run
    Any help would be appreciated!!
    Thanks in advance!
    Anton Litvinenko
    p.s. I am using IE6.0 , if this makes any sense...
    p.p.s I dont have any NATIVE methods!!!

    Use java plugin instead of microsoft vm.

  • Applets/Browser problem pleaz Help

    Hi folks,
    I have a strange problem..!
    My browser (I.E 5.01) will now not display applets, It will display all the html content & read JavaScript but the applet doesn't initalise.
    There are no error messages, & the program compiles fine, I edited, compiled & run an Applet with no prob (as I have been doing all along) then Edited, compiled one of its subclasses, when I tried to run it all I got was a blank page, with "done" in the status line.
    If I mouse over where the Applet should be I get no error or "applet started" message.
    I have also viewed websites that I know have applets embedded & it is the same, no applet displayed.
    I have reinstalled the browser, checked all the settings & the html file is correct.
    The browser seems not to recognise the <applet> tags.
    Please Please Please can someone help me , I have coursework to do & need to get on.
    also the applet will run in the appletviewer..
    Many thanks in advance

    I think the <applet> is now deprecated. Newer applets tend to use the <embed> tag, and instead of running within the browser's own virtual machine they are executed using the java plugin, which is installed automatically when you install Sun's jre or jdk on your machine.
    For more information look at the Java plugin documentation at http://www.javasoft.com/products/plugin
    and see the following link which describes how to convert from applet tags.
    http://www.javasoft.com/products/plugin/1.3/docs/quick_start.html#convert

  • Applets-browser security settings

    Hello all,
    I created an applet.But it will run only if we change the java custom settings and enable "Access to all Network Addresses".How can i avoid these settings explicitly in the browser by writing code in an applet.
    Kishore.

    If you sign your applet and run it using Java Plug-in 1.3.1, you will be able to open sockets with other network addresses without having to change any client settings (browser or otherwise) provided that you sign with a certificate whose chain begins with a CA certificate that exists in the cacert file (VeriSign, Thawte, others).

  • Applet BROWSER problem

    My applet compiles and runs fine on my system but when i uploaded it to the internet, the applet is not loading and the error I i'm having is
    load:class registration.class not found.
    if I access the site with my system the applet reuns fine but not on every other system.
    i need urgent assistance please.
    .

    >
    My applet ..>Do your users really require an epplt, or just something that can be launched from a web page? If the latter, (Java Web Start) JWS is a much better option.
    Here are some examples of using web start <http://www.physci.org/jws/>
    >
    ..compiles and runs fine on my system but when i uploaded it to the internet, >The internet is a big place. Care to narrow down where we can see the breaking applet? What URL?
    >
    ..the applet is not loading and the error I i'm having is
    load:class registration.class not found.>Which version(s) of which browser(s) on which OS(s) running what Java version(s)?
    >
    if I access the site with my system the applet reuns fine but not on every other system.>Note that no project will ever run on 'every system'. Coding in Java means you can supply applications and applets to a lot of people, but not everyone.

  • Applet Browser Display Problem

    Hello, I'm a student learning java, I'm on my final assignment and came across a confusing problem, my applet won't display in my browser, although when I compile it, I get no errors.
    Here's my code for anyone who can help.
    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.*;
    public class surveyapplet extends Applet implements ActionListener {
         ageSurvey Panel1;
         Options Panel2;
              public void init() {
              setLayout(new GridLayout(10,20));
              Panel1 = new ageSurvey();
              Panel2 = new Options();
              add(Panel1);
              Panel1.inputage.addActionListener(this);
              Panel1.thebutton.addActionListener(this);
              Panel1.thebutton.addActionListener(this);
              add(Panel2);
         public void actionPerformed(ActionEvent event) {
              String text = Panel1.inputage.getText();
                   if (event.getSource() == Panel1.thebutton) {
                        Panel2.outputage.setText(String.valueOf(text));
                   if (Integer.parseInt(text) < 21) {
                        Panel2.Option1.setState(true);
                        Panel2.Option2.setState(true);
                        Panel2.Option3.setState(false);
                        Panel2.Option4.setState(false);
                        Panel2.Option5.setState(true);
                        Panel2.Option6.setState(false);
                        Panel2.outputage.setText("likes to run, likes toys and eats burgers.");
                   if (Integer.parseInt(text) > 21 && Integer.parseInt(text) < 35) {
                        Panel2.Option1.setState(true);
                        Panel2.Option2.setState(true);
                        Panel2.Option3.setState(false);
                        Panel2.Option4.setState(false);
                        Panel2.Option5.setState(true);
                        Panel2.Option6.setState(false);
                        Panel2.outputage.setText("likes to run, eats burgers and likes toys.");
                   if (Integer.parseInt(text) > 36 && Integer.parseInt(text) < 60) {
                        Panel2.Option1.setState(false);
                        Panel2.Option2.setState(true);
                        Panel2.Option3.setState(true);
                        Panel2.Option4.setState(true);
                        Panel2.Option5.setState(true);
                        Panel2.Option6.setState(false);
                        Panel2.outputage.setText("needs reading glasses, eats burgers likes to sit and likes toys.");
                   if (Integer.parseInt(text) > 60) {
                        Panel2.Option1.setState(false);
                        Panel2.Option2.setState(false);
                        Panel2.Option3.setState(true);
                        Panel2.Option4.setState(true);
                        Panel2.Option5.setState(false);
                        Panel2.Option6.setState(true);
                        Panel2.outputage.setText("eats prunes, likes to sit and needs reading glasses.");
    class ageSurvey extends Panel {
         Label age;
         TextField inputage;
         Button thebutton;
         ageSurvey() {
              age = new Label("please enter age");
              add(age);
              inputage = new TextField(20);
              add(inputage);
              thebutton = new Button("Click Here!");
              add(thebutton);
    class Options extends Panel {
         Checkbox Option1, Option2, Option3, Option4, Option5, Option6;
         TextField outputage;
         Options() {
              add(Option1 = new Checkbox("likes to run"));
              add(Option2 = new Checkbox("eats burgers"));
              add(Option3 = new Checkbox("needs reading glasses"));
              add(Option4 = new Checkbox("likes to sit"));
              add(Option5 = new Checkbox("likes toys"));
              add(Option6 = new Checkbox("eats prunes"));
              outputage = new TextField(30);
              add(outputage);
    Thanks in advance for anyone with a solution.

    I've figured out the problem.
    the lesson:
    make sure you have all your class files in the same folder thatyour html file will be referencing.
    in my situtation, when I compiled, it created three .class files, and I only had the main .class file in the folder my html file was referencing, not all three of them.

  • Applet Browser communitcation

    Hi, I was wondering if anyone has already encountered gthis seemingly impossible problem. I have that is invoked from a jsp page. That page is the child of another jsp page. What I would like to do is somehow get message from my applet to the parent jsp page. Now I know the applet is running in its own little world but I have some ideas how to do this. It seems that the showDocument method is the only way of directly communicating with the window that invokes the applet. I can use onbeforeunload= in the body tag to fire a JavaScript that can communicate with the browser window that spawned the window that invoked the applet. (hehe) The only problem is that if I redirect the page the applet is closed or I have to deal with a popup OK/Cancel window. Do anyone know a way around that window or another means of doing what I have said??
    Thanks, Jay

    it's possible to get the JavaScript 'document' object in the Applet. if you've done that, it's relatively easy to get all the other documents, frames etc.
    see Netscapes LiveConnect (java_30.jar) on how to use JSObject in your applet.
    import netscape.javascript.JSObject;
    JSObject win = JSObject.getWindow(this);
    JSObject doc = (JSObject) win.getMember("document");
    JSObject loc = (JSObject) doc.getMember("location");

  • Applet / Browser interaction

    Hi all,
    Does anybody know if an applet can send messages to the containing browser page?
    I am invoking a method on an applet from inside a javascript, which is invoked from
    a DHTML event (OnClick). This javascript also moves the applet (Inside a span) to the position on the page to be used.
    What I need is the reverese procedure, so when the applet has finished it's task,
    to invoke another piece of javascript from the host page to move the applet off the page again.
    The javascript -> applet works great. Now I need Applet -> Javascript.
    Any ideas?

    Sorted.
    I've discovered the delights of JSObject. Does the trick well.

  • Please help me regarding Secure RMI Applet Application

    Hi Friends..
    Currently i use Java Card 2.2.1..
    I'm learning about SecureRMIDemo application that shipped with JCDK 2.2.1..
    Assume that i've loaded the SecureRMIApplet.cap successfully, and i've created the Secure RMI Client using SmartCardIO..
    And then i tried to do any process provided by Purse interface, such as debit, credit, setAccountNumber, etc..
    But i got this error message :
    java.rmi.RemoteException: Signature mismatch
         at com.sun.javacard.javax.smartcard.rmiclient.CardObjectFactory.throwError(Unknown Source)
         at com.sun.javacard.javax.smartcard.rmiclient.CardObjectFactory.throwException(Unknown Source)
         at com.sun.javacard.javax.smartcard.rmiclient.CardObjectFactory.getObject(Unknown Source)
         at com.sun.javacard.ocfrmiclientimpl.JCRemoteRefImpl.parseAPDU(Unknown Source)
         at com.sun.javacard.ocfrmiclientimpl.JCRemoteRefImpl.invoke(Unknown Source)
         at com.sun.javacard.samples.SecureRMIDemo.SecurePurseImpl_Stub.setAccountNumber(Unknown Source)
         at testRMIClient.SecureRMIClienrt.main(SecureRMIClienrt.java:27)Yes, i know that, that error message required to ensure that the application run in the Security context..
    But for me, who just getting started to Java Card Security, it becomes a problem... :(
    The message error tells that the Signature is mismatch..
    And then how to set this Signature before do any process in the SecureRMI Client application?..
    Since there's no way to set the Signature through Purse interface..
    Please help me regarding this..
    Thanks in advance..

    Thanks Shane for your reply..
    does it mean i've to send APDU?.. Because in the MySecurityService class code there's method that checks the CLA and INS byte..
    Or can i send an APDU Object while we're using the Java Card RMI Application mode?..
    Actually, in my opinion, i would say that if we use RMI mode, we don't need APDU Command anymore..
    Please correct me if i'm wrong..
    Thanks in advance..

Maybe you are looking for

  • Standard report  for unit of measures

    Is there any standard report to see the Fert material unit of measures  and its alternate unit of measures.

  • Mouse over a menu on the portal

    hello We are using Portal Nw2004s SPS14. I would like to know if it possible that, when you put the mouse over a menu on the portal, a label appears with a long text. I mean, If it is possible, in the standard. Thanks and Regards Noemi

  • How to bring new rupee symbol in reports

    Dear Gurus, We have a requirement that in all the exixting reports we need to show the new rupee symbol as $ comes doe USD. Please help me with the steps to do this. Thanks in advance.

  • How to configure shared addressbook on Mac OS X Server + LDAP

    I have tried to study this issue but haven´t find any clear answer. We need to set up a shared addressbook on our organisation, apparently this is best to implement with LDAP(?). Users should be able to add new contacts with their email clients and u

  • DateTimeConnect in UCM Call Detail Report

    An example of a dateTimeConnect value in UCM CDR: 1289328321 What is that?  How would I convert this to mm/dd/yy:hh:mm::ss?  Thank you.