Zak Nixon

Ranch Hand
+ Follow
since Sep 27, 2003
Merit badge: grant badges
For More
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 Zak Nixon

I have about 40 methods that need to
be overwritten and throwing an UnsupportedOperationException(...).

I want to say the following

The result would print out :
Can't do sampleClass.

Any suggestions would be nice.


17 years ago
In my previous posts, we ran the dynamic class loading example from Sun.
Now, we need to load these classes from a set of .jar files.

Is there any way to do that ?

18 years ago
In my previous post, I needed to be able to run the dynamic classloading example from Sun (link).
This works for classes, but does it work for other resources, such
as images, config files, etc. And if so, how does my classes reference such resources in code ?

Can someone explain to me if it works, and if so, how ?


Zak Nixon
18 years ago
Wow, Nate, great job. We followed your tutorial, and it worked beautifully.

Some changes we saw in your examples need to be made for clarity though.

1. When compiling the RMI_Server classes the command is :

There was a typo stating compiling *.jave files, which is not the case.

2. In the client .bat file (runclient.bat), the policy file flag should be the following :

The trailing .policy was missing.

Other than that, everything seems 100% correct.
Thanks again Nate for your help. It is worth 1 trillion dollars.

Until the next RMI question,

Zak and Morgan
18 years ago
Current status: Still no solution.

We have tried to get the example working in 1.4 and 1.5, but the error is the same. (i.e. Access denied to the classloader).

This is our file structure:

|- server (contains ClassFileServer and ClassServer, also the batch file to run the http server)
|- serve (contains all of the server + client code. Hello,Hello_Impl,MessageObject,RMIClient,RMIServer, and the batch file)
|- client (contains the RMIClientLoadernRMIClientBootstrapSecurityManager)

Also here are my batch files:

Batch for the HTTP Server:

Batch for the RMI Server :

And finally the client bootstrap program:

Now, for my policy files:

C:\\java.policy (basically just modified the JDK's policy file)

We have just about tried everything we can think of. Can anyone help us?


18 years ago
What version of Java are using to run this example ?
18 years ago
Well, both ways. Can you somehow post all your code and batch files, so I can
try to run them on this side? We are really frustrated, and cannot get this to work.


18 years ago
Here is my problem:
I am trying to recreate the example located here :
Bootstraping Example

I have set up everything to the tutorials specifications, yet I still
get this error :

To resolve this problem, I have followed a topic on JGuru that seemed to encounter the same issue, but we can not fix it using their advice.
Bootstrap Topic

Please help in any way you can. If you have that example up and running,
please reply.

Running out of options,

Zak ( ) and Morgan ( )
18 years ago
Are there any community backed RMI
benchmarked tools out there ? Or are there
any documents outlining verifiable tests
used to construct benchmarks ?


18 years ago
I found my problem, and it was nothing
to do with the query.


Zak Nixon
I am using MySQL as my db.
I have a table called test, with columns (pkId,testId,testRun)
I need to get the highest number from the testRun column based on the testId.

I place this query in my DB query executor :

It works.

When I place it in my JDBC select statement, it returns no matching rows.

Is there something particular about this query that allows JDBC not to work ?


Well, my motivation.......

In my past projects in doing the same technique, it has
made modifications to the code very simplistic, including
more reusable across entire application.

My objects: Pretty simplistic object structure...

I have an interface called ClickAndDropObj which will be an aggregate
object in a list called ClickAndDropObjLibrary.

There are other responsibilites of the CNDObjLibrary. Once and CNDObj
is added, the library will update its view (being a self contained GUI).
So at all times the CNDObject will know how to display itself.

But, my real confusion is the following:
I want the best way to add these elements to the library, but who really
needs the responsibility of doing so? The element, library, or moderator ?

If it is the element, then the element would be coupled with the library.
Likewise with the library.
The moderator would be the glue between the lib and aggregates. Mainly responsible for adding,removing, updating the list.

So, is there any best way to do so ?

Thanks for reading my post....
I am trying to follow Holub's pure OO philosophy about OOA/D.

So in the light of that, who is responsible for adding an object to
a library (or list of elements).

- The element itself will know what list to add itself to.
- The library will create a generic object, place it in the list,
and return it to the calling application.
- Or, a controlling application that creates the library and elements, and physically adds them to the list.

Any thoughts?
Thanks everyone on this post for helping me solve this exact problem.
Javaranch is such a valuable resource!!

Zak Nixon
18 years ago
Thanks Arjun K.

By using the URLClassLoader class, I was successfully able to
amend my classpath and load my classes as needed.

I appreciate the help and guidance.

18 years ago