title: Class javacard.framework.service.CardRemoteObject not found
body: <p>I'm newer in Java Card Platform so please be patient with me. I'm trying to develop an RMI application for the Java Card 3 Platform. My IDE is Eclipse and my OS is Windows 10. I start by creating a simple interface <code>IContor.java</code> responsible for increasing, decreasing, etc. certain values.</p>
  
  <p>Here is my interface:</p>
  
  <pre><code>package sid;
  import java.rmi.Remote;
  import java.rmi.RemoteException;
  
  import javacard.framework.UserException;
  
  public interface IContor extends Remote{
     public void Incrementer()throws RemoteException,UserException;
     public void Decrementer()throws RemoteException,UserException;
     public byte GetValue()throws RemoteException,UserException;
     public void Init(byte value)throws RemoteException,UserException;
  }
  </code></pre>
  
  <p>Then I provide an implementation for this interface which I named <code>Contor.java</code>:</p>
  
  <pre><code>package sid;
  
  import java.rmi.RemoteException;
  import javacard.framework.UserException;
  import javacard.framework.service.CardRemoteObject;
  
  public class Contor extends CardRemoteObject implements IContor {
     private byte contor = 0;
      @Override
      public void Incrementer() throws RemoteException, UserException {
          ++contor;
      }
  
      @Override
      public void Decrementer() throws RemoteException, UserException {
          --contor;
      }
  
      @Override
      public byte GetValue() throws RemoteException, UserException {
          return contor;
      }
  
      @Override
      public void Init(byte value) throws RemoteException, UserException {
          contor = value;
      }
  }
  </code></pre>
  
  <p>My Test applet worked ok. Below I wrote that peace of code:</p>
  
  <pre><code>package sid;
  
  import javacard.framework.*;
  import javacard.framework.service.Dispatcher;
  import javacard.framework.service.RMIService;
  
  public class Test extends Applet {
      Dispatcher dispatcher;
  
      public static void install(byte[] bArray, short bOffset, byte bLength) {
         new Test().register();
      }
  
      protected Test() {
         RMIService rmiService = new RMIService(new Contor());
         dispatcher = new Dispatcher((short)1);
         dispatcher.addService(rmiService,Dispatcher.PROCESS_COMMAND);
      }
  
      @Override
      public void process(APDU apdu) {
          dispatcher.process(apdu);
      }
  }
  </code></pre>
  
  <p>This is a standard piece of code. However I want to create a client which uses that interface which implements the interface <code>Remote</code>. So I create a Java application in which I copied the <code>IContor.java</code> interface. Then I opened a command prompt and do the following things:</p>
  
  <ul>
  <li>Go into the directory where the source files of the first project is located (<code>cd bla_bla/Contor/src</code>)</li>
  <li>Go a directory up (<code>cd ..</code>)</li>
  <li>Go into bin directory (<code>cd bin</code>)</li>
  </ul>
  
  <p>Here I have located the name of the package ( <code>sid</code>) and into package <code>sid</code> I have those three files (<code>Contor.class</code>, <code>IContor.class</code> and <code>Test.class</code>).
  Then I typed the following command on the command prompt:</p>
  
  <pre><code>rmic -v1.2 -classpath .;%JC_CLASSIC_HOME%lib/tools.jar -sid/Contor
  </code></pre>
  
  <p>but I got the following error:</p>
  
  <blockquote>
    <p>Class javacard.framework.service.CardRemoteObject not found in class sid.Contor.</p>
  </blockquote>
  
  <p>I replace the <code>tools.jar</code> with <code>api_classic.jar</code> but I still get the same error .
  The <code>%JC_CLASSIC_HOME%</code> contains the path to the Java Card 3 development kit. <code>tools.jar</code> contains compiled implementations of packages <code>javacard.framework</code>, <code>javacard.security</code>, <code>javacardx.biometry</code>, <code>javacardx.external</code> and <code>javacardx.framework.tlv</code> . My bout is to generate a client application in <code>bin/sid</code> directory.My <code>%JC_CLASSIC_HOME%</code> value is  <code>C:\Program Files (x86)\Oracle\Java Card Development Kit 3.0.5ga\</code> and I'm using <code>JDK 1.8</code></p>
  
  <p>Here is my Package Explorer from Eclipse : </p>
  
  <p><a href="https://i.stack.imgur.com/lCubk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lCubk.png" alt="enter image description here"></a></p>