Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!

Daniel Wu

Ranch Hand
+ Follow
since Jun 13, 2001
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 Daniel Wu

Hi folks, can anyone help to catch the "speedy guy" (:-
By using MS-DOS, the server side program appears to run well, but the output is displayed too fast to be seen. How can i catch the output???
I am using command "start java" rather than "javaw". Also i have tried both commands below after reading Sun advice at
start java EchoImpl
Any input to catch output would be appreciated!
[This message has been edited by Daniel Wu (edited August 24, 2001).]

Originally posted by Tim Lauster:
I did not have the current working directory in my classpath.

Hi Tim,
Could you please elaborate a bit the procedure you put your current working directory in your classpath? Also did you check out your classpath on Windows by running AUTOEXEC.bat file, or other ways? Thank you for your reply.

Originally posted by James McGee:
The appropriate fix is to set the classpath with an entry that points to your certify folder. For example, if you had your project stored in c:\Jbuilder5\myproject\, you'd want to put C:\Jbuilder5\myproject\classes\certify; into your classpath system environment variable.

I am using Win98, i tried to place a line like the following at the end of the AUTOEXEC.BAT file:
SET PATH=C:\windows\jbproject\certify\classes\certify; %PATH%
When i click the .BAT file, it ran, and there is no prompt for input. How should i add them into my classpath system environment variable?

I think you can also start the rmiregistry from the directory that your package starts in and it will work as well. In this case that would be the classes directory.

James, could you tell me how to start the RMIRegistry from the directory my package is located? For i am using JBuilder 5 Personal, all i need to do to configure the RMIRegistry is to specify "parameters"which, i think, refers to port number and i leave it blank(default port). How can the configuration you recommended help register the server implementation object to RMIRegistry, which i am working on before i move to client side at next step?
I tried to make it but it's hard, so i post back and seek your further advice. Thanks!

Originally posted by Doug Melzer:
Try specifying a protocol (i.e. file or http if you have a web server)-Djava.rmi.server.codebase="file:/C:/WINDOWS/jbproject/certify/classes"

Hi Doug, when i tried like ""...codebase=file://C:/.../classes/certify/", i got the erro : access denied ( \\C\WINDOWS\jbproject\certify read). Could you help with this exception?
I am right now trying to register the server implementations to the RMIRegistry, and i haven't dealt with client access so far. But i just can't get server program registered...
Thanks Michael!
Sorry i've to clarify a bit. Right now i am just testing my server program, and i have no problem constructing an object. But when i bind the object (server implementations) to RMIRegistry, the exceptions occur!

Originally posted by Michael Ernest:
Remember that before the client gets a stub, rmiregistry's classloader loads _and resolves_ the stub class by using the codebase property. The interface(s) implemented by the stub class must be available via codebase or rmiregistry fails to bind.

My stub class implements two interfaces: certify.RemoteData,and java.rmi.Remote; how should i make the interfaces available via codebase???my current codebase is: "-Djava.rmi.server.codebase=file://C:\windows\jbproject\certify\classes\certify/" for which i got an Error:
Error: access denied ( \\C\WINDOWS\jbproject\certify\classes\certify read)
Also, the interface class certify.RemoteData is included in the folder classes\certify, so do i need to put it in codebase again, if so, how? Thank you very much for consideration!

[This message has been edited by Daniel Wu (edited August 22, 2001).]

Originally posted by Bosun Sogeke:
You might want to compile your java source file(s) using the -d option of javac.

Thank you Bosun for your formula which works! Could you give me some info.(or Some related webAddress) about what's going on behind the scene when i use the -d option of javac. Thanks a lot.

i am using JBuilder 5 Personal IDE in my Win98. If i configure VM parameters like "...policy""...codebase=C:/WINDOWS/jbproject/certify/classes/certify", the message shows up like:
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: certify.RemoteDataImpl_Stub
If i put file:// in, like "...policy""...codebase=file://C:/.../classes/certify/", the exception changes to: access denied ( \\C\WINDOWS\jbproject\certify read)
Could anyone help about how to get around these exceptions and get the server implementations binded to registry?! Thanks a lot in advance.
[This message has been edited by Daniel Wu (edited August 19, 2001).]
[This message has been edited by Daniel Wu (edited August 19, 2001).]
Thank you very much for your guidance, James! Constructing server implementations has succeeded now. I have a new question.

java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: certify.RemoteDataImpl_Stub
My question is:
I got the RemoteDataImpl_Stub which is not under certify but under the file RemoteDataImpl which is under certify, so certify.RemoteDataImpl_Stub is not correct expression.
Thinking that i need to put the file RemoteDataImpl_Stub directly under certify; but the question is RemoteDataImpl_Stub is created by VM and thus is automatically put under its parent RemoteDataImpl. How can i do about it?
Can anyone help me resolve the confusion. Thanks in advance!
Hi, Thank you!
i am still facing problem. When i tried to start my server program which compiled without problem, the "Runtime Properties" window pops up which show my VM""java.rmi.server.codebase=C:/WINDOWS/jbproject/certify/classes"
Then i click OK, then a Message window pops up saying: "unable to start runtime due to imcomplete configuration."
What more do i need? Thanks.
According to JBuilder samples RMI project note, I need to configure the client file by using the "configurations..." menu item from Run, but it is always deactivated. Now i need to run SCJD's FBN, with "configurations..."deactivated, how should i configure (grant permission)to the Could anyone please give me some guidance? I am using Win98SE. Thanks in advance.
If you are around the area, maybe we can form a study group and learn from each other? Email me:
Has any folx encountered the same problem when using MS-DOS commmand line to compile db.db. compiles fine, but compiling will give errors like"Can't resolve symbol (i.e.,FieldInfo)". Compiling other files in db.db will give the similar errors.
Please shed some light on it, thanks in advance.
Hi Andreas, just want to thank you first, and i will check the website you give right now...
Is Forte (Community Edition) able to run RMI project, say our current SCJD assignment FBN? I cannot figure out a way to do it. Any light thrown on it would be very much appreciated.
Hi Andras,

In my code Data's find compares the argument with the values[0],
where values[] is a DataInfo array.

Same with mine!

Therefore, I think, it should
match with Flight number and in my database there is no such
a number.

Yeah, you are right! i agree with you that the argument toMatch should match with some Flight number! In my db.db file, THERE IS FLIGHT NUMBER. a typical output of a record is:
suncerfiy.db.DataInfo@2f6684recordNumber = 1
Fields: Name = Flight number value = SA001
Name = Origin airport value = SFO
I did wrong the first time for i followed Sun's instruction and use a record number as the argument which always "find" a null result. When Flight number value, say SA001, is used as "toMatch" string, the expected result comes out!
Thus, sun's wording is not quite right when it says "For this assignment, the key field is the record number field...@param toMatch The key field value to match upon for a successful find".
Anyone please correct me if i missed something here. Andras, thank you and good luck!