Edward Harned

Ranch Hand
+ Follow
since Sep 19, 2005
Edward likes ...
Edward Harned is a software developer with over thirty years industry experience. He first led projects as an employee in major industries and then worked as an independent consultant. Today, Ed is a senior developer at Cooperative Software Systems, Inc., where, for the last ten years, he has used Java programming to bring multi-threading solutions to a wide range of tasks.
A Java RMI Server Framework: http://coopsoft.com/ar/rmi_article.html
Multi-Threading -- The Next Level: http://coopsoft.com/ar/mt_article.html
Managing Threads in J2SE: http://coopsoft.com/ar/j2searticle.html
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Edward Harned

What do you mean by "run in the same sequence as it ran in my JVM?"

Do you mean one runs to completion. Then two starts and runs ....

In such a case why bother with threads.
Everything you can do on a command line you can do with the Run Configurations.
7 years ago
Just open Run Configurations and add the jar file pointer there.
7 years ago
My first suggestion is to search the forum for similar problems. You're about the millionth person to ask this question.

Next look into classpath.
7 years ago
Now it gets interesting.

RMI is a single session -- A contacts B, B responds to A. Done

What you want is sessions going both ways. B, the service, can send messages to A, C, D, etc.

In order to do that, the clients need to become RMI servers. This is very similar to RMI callback -- the clients need to implement a Remote interface, so the server can call them back. There are examples here to do that. There are tutorials on the internet, etc.

Once you do it once, it becomes simple.
7 years ago
The simple answer is: There is no API to identify a particular caller. Do it yourself.

How? Pass a string, or some id at sign-on time to associate a user and continue to pass that id for every call thereafter.

How else? You said you didn't like the other complex methods, so innovate.
7 years ago
I've been doing RMI since release 1.1. I gave you a policy file that works. Use it. Other people have been using the tutorial for over a decade. Perhaps the problem is not with the tutorial.
7 years ago
Try using the file I gave you with: permission java.security.AllPermission "", "";

The RMI Registry is a Java program and also needs a permission file.
7 years ago
You have a permission problem. The "all" permission policy works for ALL permissions. So java isn't finding your policy file. When java doesn't find a policy file it never says so, it just craps out. Look further into finding the file.
7 years ago
How about just keeping a list of callers yourself.
7 years ago
You need to have a policy file with RMI, such as:

and on your script add: -Djava.security.policy=%WHERE YOU PUT IT%\Security\policy.all
7 years ago
Are you looking for a Fork/Join solution? F/J works well with recursion. Perhaps this article I wrote may help: A Java Fork-Join Conqueror
7 years ago
Please read this: http://sscce.org/

Now the problem is not with all that code. The problem is with your script.
CLASSPATH is probably the problem. The client, server and RMI Registry all need access to the classes.
For local testing it is easiest to have every class on the CLASSPATH.
Then when all is working, you can separate classes.
7 years ago
Keep looking. Nothing happens by magic.