he qinfeng

Greenhorn
+ Follow
since Sep 13, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by he qinfeng

Sorry, Andrew Monkhouse,I'll follow the UBB Code next time,and thanks for solving my puzzle.
Hi everyone:
I register ActionEvent to the JButton for start the server,code is following:



if you indicate the right portNum and dbLocation first,then click the JButton,server runs OK;But if you indicate the wrong portNum and dbLocation first and click the JButton,of course server does't run,it's strange that I indicate the right portNum and dbLocation immediately and click the JButton again,server also does'n run and throws the RemoteException?Why?Can I specify portNum and dbLocation any time and run the server ok?
Thanks for your answer.

[Andrew: put the source code between [code] and [/code] UBB tags]
[ September 23, 2004: Message edited by: Andrew Monkhouse ]
Thanks
I solved it by your way.
Hi everyone:
When in server mode,I want to use a method called startRmiRegistry() to run the rmiregistry,instead of inputting "start rmiregistry" command in DOS,but I don't know how to write startRmiRegistry(),please help me.
Thands for your answer.
Thanks Entwistle.
By your opinion,I also solved my problem.
Thanks
JFileChooser is the better way,and I will use it to work out.
Hi everyone:
When the program run in local mode,it allow user to input the db-file-path and db-file-name.if the db file located E:\javacode\db.db,the db-file-path is E:\javacode\ or E:\javacode in JTextField?
I think E:\javacode\ is better,db-file-path add db-file-name is ok.But E:\javacode is familiar with user ,and if on Win32,db-file-path + "\" + db-file-name is ok,if on Solaris,db-file-path + "/" + db-file-name is ok,it's difficult to judgement.
Thanks for your answer.
very quickly and congratulation

thank you help me
Hi everyone:
How should I understand the introduction:

"When you submit your assignment, each part (client and server) must be executable using a command of this exact form:
java -jar <path_and_filename> [<mode>]"

it means that the <jarname> is required,the [mode] is optional and all classes of the client and server needn't have the mode flag?
Thanks for your answer.
Hi everyone:
The assignment said that:"To avoid unnecessary complexity in the marking environment certain restrictions are placed on solutions that use RMI. Specifically you must not require the installation of a security manager."Without the security manager ,RMI will run normally?
Thanks for you answer
I use the following code open the data file:
File f = new File(dbname);
if (f.exists() && f.canRead() && f.canWrite())
db = new RandomAccessFile(f, "rw");
"When you submit your assignment, each part (client and server) must be executable using a command of this exact form:java -jar <path_and_filename> [<mode>]"
it means that all classes of the client and server must have the mode flag,in the code if the mode flag does't equal to the specified mode flag,it will throw a exception?