• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

something about rmic

 
stanley wang
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,all
the ProductImp1.java and ProductImp1.class save in c:\test\;
i used command:
rmic ProductImp1
show error:can't find the class ProductImp1
why?
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have your classes in packages?
and are you running RMIC from the c:\test directory?
Mark
 
stanley wang
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,Mark:
because i get the scjd exam ,so i must do some test code.
i have no "package" expression .
only:
import java.rmi.*;
import java.rmi.server;
public class ProductImp1 extends UnicastRemoteObject implements Product{
... ...
}
i have try run "rmic ProductImp1" in "c:\test" but show the same error!
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh just to make sure you are compiling the class first, right?
OK try this. Make a sub directory under the test directory called stanley. Make your class be in the stanley package

Then in your test directory run

Let's see what happens there.
Mark
 
Ian B Anderson
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
The other thing to check is that . is in your classpath.
E.g.
rmic -classpath . packageName.ClassName
or without packages
rmic -classpath . ClassName
Ian
 
stanley wang
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,Mark and Anderson :
thank you for your help .i tried it in many ways .This morning i get it at last .
we must add the sentence as this in autoexec.bat
set CLASSPATH=.;c:\jdk1.3\;
after it ,it's OK now !
thank you again!
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good call Ian. I made an assumption there.
Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic