• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem running the RMI tutorial in Sun's website!  RSS feed

 
H Melua
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello

I've been trying to run the Sun's RMI tutorial and i've so far ended up with nothing!

I'm trying to run it using Netbeans 6, and the problem i'm having is



now the package compute.jar is added to the libraries and it contains the two classes Compute.class & Task.class

why isn't it finding it?

how do i solve this
HannaH
[ June 23, 2008: Message edited by: H Melua ]
 
Edward Harned
Ranch Hand
Posts: 291
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to set the class path with either -cp or the environmental: CLASSPATH
 
H Melua
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ed for replying

I know i should set the classpath, but thats my problem, i don't know how!



I decided to try the Hello tutorial on sun's site

it says do


but it doesnt say what the classDir is supposed to be!
 
H Melua
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK lets try this

if my main directory is

C:\temp\HelloRMI

where the classes are stored in example\Hello (Server.class, Client.class & Hello.class) within this directory
then i should be able to run the command



right? well it isn't right because its displaying the same error as above!
The only difference is that it is complaining about not finding example.hello.Hello !



although Hello is in the same directory as Server!!
[ June 23, 2008: Message edited by: H Melua ]
 
H Melua
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I realised what the problem was!!

I needed to run the RMI registry from the same directory, although that is not mentioned anywhere in the silly sun's site!!

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!