Why cann't rmic find the class?

I have write some RMI Code,and I could compile them correctly,but when I wanted to generate Stub and Skel by rmic ,it showed me that:
E:\JavaPro\CH21-05>rmic RmiTestServer
error: Class RmiTestServer not found.
1 error
I don't know why?
Here the source which helps to understand the problem:
//Code in RmiTest.java
import java.rmi.*;
public interface RmiTest extends java.rmi.Remote
     //Definate an interface from java.rmi.Remote
     public float getRmiTest(int r) throws RemoteException;
//Code in RmiTestServer.java
import java.rmi.*;
import java.rmi.server.UnicastRemoteObject;
import java.lang.Math;
public class RmiTestServer extends UnicastRemoteObject implements RmiTest
     //load the constructor of UnicastRemoteObject
     RmiTestServer()throws RemoteException
          super();
     //The client will send the parameters to here,and calculate,and get the results back
     public float getRmiTest(int r)throws RemoteException
          float circlerate=(float)(2*Math.PI*r);
          return circlerate;
     public static void main(String args[])
          try
               Naming.rebind("//127.0.0.1:1099/RmiTestObj",new RmiTestServer());
               System.out.println("RMI Connecting...");
          catch(Exception e)
               System.out.println("RMI can't connect... :"+e);
               System.exit(-1);
//Code in RmiTestClient.java
import java.awt.*;
import java.rmi.*;
public class RmiTestClient
     public static void main(String args[])
          float circlerate=(float)0.0;
          try
               //Set security manager according to security mechanism
               System.setSecurityManager(new RMISecurityManager());
               //Query remote object,and it's host address is 127.0.0.1 ,and it's port is 1099
               //RmiTestObj is a byname of RMI logging on
               RmiTest obj=(RmiTest)Naming.lookup("//127.0.0.1:1099/RmiTestObj");
               //method to load remote object
               circlerate=obj.getRmiTest(5);
               //print the result
               System.out.println("Total circlerate is : "+circlerate);
          catch(Exception e)
               System.out.println(e.getMessage());
How can I solve this problem?

I made it by runing the following command line:
rmic -classpath E:\JavaPro\CH21-05 RmiTestServer
and it created two files: RmiTestServer_Skel.class and RmiTestServer_Stub.class
Thank you very much!
--Steven                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Find the Class Name in a static method

    Hi All,
    I am trying to find the class name inside the static main method. I want to write one main method that loads an instance of the class. Other folks have suggested tricks with the security manager or creating an Exception to look at the stack trace, but these methods don�t reflect the inheritance. I want SUBCLASSES to be able to run from the command line using the inherited main method.
    public static void main(String args[]){
          JPanel thisJPanel = (JPanel) Class.forName(????).newInstance();
    }Any Ideas

    I want
    SUBCLASSES to be able to run from the command line
    using the inherited main method.Someone pointed this out already but more directly, static methods are not inherited.
    The behavior you desire ca be achieved using the Factory pattern.
    The idea of being able to subclass an application is a little bizarre. Why don't you just do something like this:
    public static void main(String[] args){
        // check that there is at least one parameter 
        JPanel thisJPanel = (JPanel) Class.forName(args[0]).newInstance();
    }

  • FM/Class to find the class and characterstics for a given material

    Hi All,
    Is there any Class/FM to find the class and characterstics for a given material.I tried some BAPI_OBJCL* BAPI's but lot of the BAPI's need classnum as input parameter. But i need a BAPI or tables or class which can give the class and its characterstic values for a given material.

    Hi Ben
             Try ..
    BAPI_OBJCL_GETCLASSES
    BAPI_OBJCL_CREATE

  • I have upgrade ios 6 to ios7 on my iphone 5.  I do NOT like it.  I want to come back to the previosu version.  why is it so complicated.  Why can I not find the instruction strait from apple? This is the worst possible upgrade ever.

    I have upgrade ios 6 to ios7 on my iphone 5.  I do NOT like it at all.   I want to come back to the previous version.  why is it so complicated? Why can I not find the instruction strait from apple? This is the worst possible upgrade ever.  It make me think of when ericsson got sold to Sony....drastic PC change.
    I would like to have simple instruction on how to downgrade.
    It feel like a change that I did not ask for , ok I push the upgrade buttom, but really this is the worst update aver!
    HELP!

    iPhone User Guide (For iOS 7 Software)Sep 20, 2013 - 23 MB

  • Why can't I find the Illustrator CC 2014 toolbar on my screen on Windows 7?

    Why can't I find the Illustrator CC 2014 toolbar on my screen on Windows 7? The screen resolution is 1280 x 1024.

    Hi Chris,
    Can you please put a snapshot of the screen so that we can know more about the issue ?
    Thanks & Regards,
    Raghuveer

  • From which table I can find the "Class type" and "Class" of the material?

    From which table I can find the "Class type" and "Class" of the material?
    Thanks in advance for the answers....

    Hi,
    try following table
    KSSK     Material number to class     
    KLAS     Class description     
    KSML     Characteristic name     
    CABN/CABNT     Characteristic name description     
    CAWN/CAWNT     Characteristic name
    [http://www.sap-img.com/materials/classification-view-of-material-master.htm]
    [http://wiki.sdn.sap.com/wiki/display/ERPLO/FrequentlyUsedTables]
    Regards
    kailas Ugale

  • Which Table, can I find the class and characteristic assigned to equipment.

    Hi all,
    I have assigned a characteristc to a class.
    And assigned this class to an equipment.
    Now in which table can i find the class assigned to this equipment.
    What is the logic to find the class and characteristic.
    Thanks in advance.
    Piyush

    Hi,
    As per above post, you can find classes. To find characteristics, Give EQUNR value in OBJEK field in AUSP table & get the ATINN value.
    Give ATINN value in ATINN field in CABN table & get ATNAM field value.
    In AUSP table, you can get the values against each characteristics as well.
    Regards,
    Maheswaran.
    Edited by: Maheswaran.K on Apr 19, 2011 9:28 AM

  • Cannot find the class!! - URGENT!!!

    I have an JSP archive and I�m using the Tomcat 4. I did a class named ConnectionBean that connect with a database.
    when i start my JSP, the Apache server show me an error page that say it�s impossible to find the class "ConnectionBean". I tryed to put it in the same directory of the JSP file, but happened the same error.
    I tryed to put it in the directory "apache tomcat 4\lib\" but i have the same error.
    I tryed to put it on the directory "jre\lib\ext\ of my JVM, but i have the same error!
    Please, somebody can help me to do my JSP find this class?
    Thanks for all

    after you compile your class you should put the .class in the WEB-INF/classes/ directory
    lets suppose that you wrote in the top of your class
    package com.mydbconnection
    this means that your class should be in
    WEB-INF/classes/com/mydbconnection/MyClass.class
    in your JSP have been like this
    <jsp:useBean id="DBConn" scope="page" class="com.mydbconnection.MyClass" />
    hope this help enough :)

  • Cannot find the class file

    Hi All,
    Can any one help me regarding the issue?
    Error:
    package com.support.misc.feedback
    I am getting the following error for the above line. But I have created the Hierarchy in folder structure. But still it is throwing the error.
    1. Cannot find the class file for com.sapportals.htmlb.page.DynPage
    2. This compilation unit indirectly references the missing type com.sapportals.htmlb.page.DynPage (typically some required class file is referencing a type outside the class path)     FeedbackBean.java
    Thanks in Advance.
    Message was edited by: Gowsika Kannan

    Hi Gowsika,
    the class needed is located in htmlb.jar which can be found under <irj-root>/WEB-INF/portal/portalapps/com.sap.portal.htmlb/lib
    You need to integrate this jar in your .classpath
    Hope this helps,
    Robert
    PS: Please do not post the same question 3 times

  • Cannot find the class file for com.sap.portal.services.api.connectorgateway

    Hi,
    I was trying the "How to BI JAVA SDK in a Portal iView and get the following error.
    The project was not built since its classpath is incomplete. Cannot find the class file for com.sap.portal.services.api.connectorgateway.IConnectorGatewayService. Fix the classpath and try rebuilding this project.
    I have the following in my portalapp.xml file
    <property name="SharingReference" value="com.sap.portal.ivs.connectorservice"/>
    and i have also added the jar file "com.sap.portal.ivs.connectorservice_api" in the set of lib's
    Has some faced a similar issue? or can someone suggest how I could possibly resolve this.
    Thanks,
    Smitha

    Hi Smitha:
       My webdynpro dc was build failed for "This compilation unit indirectly references the missing type com.sap.engine.services.webservices.espbase.client.dynamic.content.GenericObject (typically some required class file is referencing a type outside the classpath)".
    How should i do?  Thank you!

  • Why  I can't find the overall status in billing document!?

    Hi,
    Why I can't find the overall status in billing document? but I can find this status in table VBUK, some documents set 'B' in this field, some set 'C', all of them are Completed and the corresponding account documents are cleared. for this status is 'B',I can't archive these documents.
    Thanks.

    Dear Lance
    Check the field Document object    i.e Document Status object .
    A     Order
    B     Purchase order
    F     Billing document
    K     Sales activities
    L     Delivery
    T     Shipment
    V     Shipping
    X     Others
    Check if all your entries are F, if not find out which document and try to find out why it is not C.
    Do revert with your feedback
    If it is still a problem , check some SAP notes
    For e.g. Note 142368 - Segment VBUK missing in billing document
    Header status segment VBUK is missing in the billing document.You can check this with the general table display (SE16).
    It is not yet known why this segment is missing.
    correct many documents, you can use report ZZVBUK01.
    Regards
    Jitesh
    Regards
    Jitesh

  • Why I can't find the update menu in the Help menu for Photoshop Elements 10 on my Mac?

    Why I can't find the update menu in the Help menu for Photoshop Elements 10 on my Mac?
    I can't manually update the saw plug-in either. I am stuck!

    Authorization and Deauthorization
    Macs:  iTunes Store- About authorization and deauthorization.
    Windows: How to Authorize or Deauthorize iTunes | PCWorld.
    In iTunes you use the Authorize This Computer or De-authorize This Computer option under the Store menu in iTunes' menubar. For Windows use the ALT-S keys to access it. Or turn on Windows 7 and 8 iTunes menus: iTunes- Turning on iTunes menus in Windows 8 and 7.
    More On De-authorizing Computers (contributed by user John Galt)
    You can de-authorize individual computers, but only by using those computers. The only other option is to "de-authorize all" from your iTunes account.
      1. Open iTunes on a computer
      2. From the Store menu, select "View my Account..."
      3. Sign in with your Apple ID and password.
      4. Under "Computer Authorizations" select "De-authorize All".
      5. Authorize each computer you still have, as you may require.
    You may only do this once per year.
    After you "de-authorize all" your authorized computers, re-authorize each one as required.
    If you have de-authorized all computers and need to do it again, but your year has not elapsed, then contact: Apple - Support - iTunes - Contact Us.

  • HT4623 Why can't I find the Software Update button?  I only see About and Usage.

    Why can't I find the Software Update button?  I only see About and Usage.

    Under About, what version do you have? The Software Update option in Settings was not introduced until iOS 5.0.

  • Why can't i find the airplay key on my new ipad. i have hit the home key twice and scrolled but it's not there?

    Why can't i find the airplay button on my new ipad? I've hit the home key twice and scrolled left but it's not there any clues please?

    Look through this suppport document.  You'll probably find a solution.
    Using AirPlay, http://support.apple.com/kb/HT4437

  • Why can't i find the instagram app for ipad in the App Store?

    why can't I find the instagram app in the App Store for the ipad?  There is one for the iphone...

    Perhaps because the "Instagram" App is optimized only for the iPhone 5 currently and there is no Instagram App for the iPad only at this time???
    I don't see one listed in the U.S. App Store.

Maybe you are looking for

  • Creation of new storage pool on iomega ix12-300r failed

    I have a LenovoEMC ix12-300r (iomega version). IX12-300r serial number: 2JAA21000A There is at present one storagepool (SP0) consisting of 8 drives (RAID5). HDD 1-8 (existing SP0): ST31000520AS CC38 I have aquired 4 new Seagate ST3000DM001 drives as

  • HT4623 how to unlock a disabled iphone 4s?

    Im trying to unlock my phone, it says disabled...connect to itunes.

  • Question: PE4 -- missing presets, project settings frame size disabled

    Hi -- I'm running PE4 and with YouTube's new widescreen abilities, I want to make some widescreen (16:9) videos, rather than the ol' 4:3 ratio. However, in the intitial set up when I'm creating a new video, when I attempt to change settings, I discov

  • Update statistics ends with error

    Hi Techies Few months back our BI system got crashed then ,we re-install the system & restore the database,Now the issue is whenever we are running the update statistics it gives the following error & terminates with error. BR0301E SQL error -20000 a

  • Unable to import database using impdp via network_link

    Dear All, I am trying to import database from remote location's dump to my local database after creating dblink from local db to remote db. At Remote Server: - Directory created and granted the privileges. Dir Name: PREMLIVE_EXPDP At Local server: Us