classpath - Java cannot find .class file, or class -


i have directory structure thus:

project/        src/           videoserver/                      *.java           storeclient/                      *.java        bin/           videoserver/                      *.class           storeclient/                      *.class 

my current working directory project/src/ , i'm using command java -cp "../bin/" videoserver.main

this seems right me, java telling me cannot find class ivideoserver. can see ivideoserver.class in correct folder, , seems able find main class fine.

what causing java unable find ivideoserver?


the method appears causing problem one

public static void main(string[] args) {     try      {         videoserver server = new videoserver();         videoserver.ivideoserver stub = (ivideoserver)unicastremoteobject.exportobject(server, 0);          // bind remote object's stub in registry         registry registry = locateregistry.getregistry("server-url", 9090);         registry.bind("videoserver", stub);         system.err.println("server ready");     }     catch (exception e)     {         system.err.println("server exception: " + e.tostring());         e.printstacktrace();     } } 

i have compiled of classes involved javac.


this full exception , stack trace returned me

server exception: java.rmi.serverexception: remoteexception occurred in server thread; nested exception is:

java.rmi.unmarshalexception: error unmarshalling arguments; nested exception is: java.lang.classnotfoundexception: videoserver.ivideoserver java.rmi.serverexception: remoteexception occurred in server thread; nested exception is: java.rmi.unmarshalexception: error unmarshalling arguments; nested exception is: java.lang.classnotfoundexception: videoserver.ivideoserver     @ sun.rmi.server.unicastserverref.olddispatch(unicastserverref.java:396)     @ sun.rmi.server.unicastserverref.dispatch(unicastserverref.java:250)     @ sun.rmi.transport.transport$1.run(transport.java:159)     @ java.security.accesscontroller.doprivileged(native method)     @ sun.rmi.transport.transport.servicecall(transport.java:155)     @ sun.rmi.transport.tcp.tcptransport.handlemessages(tcptransport.java:535)     @ sun.rmi.transport.tcp.tcptransport$connectionhandler.run0(tcptransport.java:790)     @ sun.rmi.transport.tcp.tcptransport$connectionhandler.run(tcptransport.java:649)     @ java.util.concurrent.threadpoolexecutor$worker.runtask(threadpoolexecutor.java:886)     @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:908)     @ java.lang.thread.run(thread.java:662)     @ sun.rmi.transport.streamremotecall.exceptionreceivedfromserver(streamremotecall.java:255)     @ sun.rmi.transport.streamremotecall.executecall(streamremotecall.java:233)     @ sun.rmi.server.unicastref.invoke(unicastref.java:359)     @ sun.rmi.registry.registryimpl_stub.bind(unknown source)     @ videoserver.main.main(main.java:17) caused by: java.rmi.unmarshalexception: error unmarshalling arguments; nested exception is:     java.lang.classnotfoundexception: videoserver.ivideoserver     @ sun.rmi.registry.registryimpl_skel.dispatch(unknown source)     @ sun.rmi.server.unicastserverref.olddispatch(unicastserverref.java:386)     @ sun.rmi.server.unicastserverref.dispatch(unicastserverref.java:250)     @ sun.rmi.transport.transport$1.run(transport.java:159)     @ java.security.accesscontroller.doprivileged(native method)     @ sun.rmi.transport.transport.servicecall(transport.java:155)     @ sun.rmi.transport.tcp.tcptransport.handlemessages(tcptransport.java:535)     @ sun.rmi.transport.tcp.tcptransport$connectionhandler.run0(tcptransport.java:790)     @ sun.rmi.transport.tcp.tcptransport$connectionhandler.run(tcptransport.java:649)     @ java.util.concurrent.threadpoolexecutor$worker.runtask(threadpoolexecutor.java:886)     @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:908)     @ java.lang.thread.run(thread.java:662) caused by: java.lang.classnotfoundexception: videoserver.ivideoserver     @ java.net.urlclassloader$1.run(urlclassloader.java:202)     @ java.security.accesscontroller.doprivileged(native method)     @ java.net.urlclassloader.findclass(urlclassloader.java:190)     @ java.lang.classloader.loadclass(classloader.java:306)     @ java.lang.classloader.loadclass(classloader.java:247)     @ java.lang.class.forname0(native method)     @ java.lang.class.forname(class.java:247)     @ sun.rmi.server.loaderhandler.loadproxyinterfaces(loaderhandler.java:711)     @ sun.rmi.server.loaderhandler.loadproxyclass(loaderhandler.java:655)     @ sun.rmi.server.loaderhandler.loadproxyclass(loaderhandler.java:592)     @ java.rmi.server.rmiclassloader$2.loadproxyclass(rmiclassloader.java:628)     @ java.rmi.server.rmiclassloader.loadproxyclass(rmiclassloader.java:294)     @ sun.rmi.server.marshalinputstream.resolveproxyclass(marshalinputstream.java:238)     @ java.io.objectinputstream.readproxydesc(objectinputstream.java:1530)     @ java.io.objectinputstream.readclassdesc(objectinputstream.java:1492)     @ java.io.objectinputstream.readordinaryobject(objectinputstream.java:1731)     @ java.io.objectinputstream.readobject0(objectinputstream.java:1328)     @ java.io.objectinputstream.readobject(objectinputstream.java:350) ... 12 more 

from src folder, have tried java -cp . videoserver.main ??

try this, javap videoserver.main


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -