• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

HeadFirst Java RMI

 
Ranch Hand
Posts: 49
Oracle Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am having trouble creating this simple RMI setup illustrated in HeadFirst java. I tried it using Tomcat but then heard that Tomcat isn't an RMI server - how do I set this up?

Thanks!
 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You definitely not need Tomcat to use RMI.

Check out the Oracle tutorial https://docs.oracle.com/javase/tutorial/rmi/
 
Franklin Marquette
Ranch Hand
Posts: 49
Oracle Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay so I started following that - I got apache up and running and created a test page and packaged up and compiled all the example code

I also created a new user called test and created a public_html file under that user

Then I tried to build the server classes - this is where I came to a roadblock

I put the compute.jar file into both the test/public_html/classes path and the frank/Java/RMI path and then tried to build it using:

javac -cp /home/ann/public_html/classes/compute.jar
engine/ComputeEngine.java


and got:

engine/ComputeEngine.java:7: package compute does not exist
import compute.Compute;
^
engine/ComputeEngine.java:8: package compute does not exist
import compute.Task;
^
engine/ComputeEngine.java:10: cannot find symbol
symbol: class Compute
public class ComputeEngine implements Compute {
^
engine/ComputeEngine.java:16: cannot find symbol
symbol : class Task
location: class engine.ComputeEngine
public <T> T executeTask(Task<T> t) {
^
engine/ComputeEngine.java:26: cannot find symbol
symbol : class Compute
location: class engine.ComputeEngine
Compute engine = new ComputeEngine();
^
engine/ComputeEngine.java:27: cannot find symbol
symbol : class Compute
location: class engine.ComputeEngine
Compute stub =
^
engine/ComputeEngine.java:28: cannot find symbol
symbol : class Compute
location: class engine.ComputeEngine
(Compute) UnicastRemoteObject.exportObject(engine, 0);
^
7 errors


I have tried everything and just don't know what to do. If you need anymore information just ask.

Thanks!

 
reply
    Bookmark Topic Watch Topic
  • New Topic