Originally posted by jian zheng:
...everything is ok before I put all files into jar,now when I run "java -jar server.jar" system tell me "XXXX_stub.class not found",I solve this problem with adding server.jar to CLASSPATH
I don't know what's the meaning of "You must provide all classes pre-installed so that no dynamic class downloading occurs" , may I require the test officer set the CLASSPATH as what I need before he run the server?
Regards, George
SCJP, SCJD, SCWCD, SCBCD
Originally posted by jian zheng:
Hi George,
Thank you .I think you are right.I'll try to run the program without setting CLASSPATH.But I'm sure that I've put the "XXXX_stub.class" in right package and it's already been in the jar,here is my package structure:
-------------
suncertify.db
-------------
Data.class
RemoteData.class
RemoteDataImpl.class
RemoteDataImpl_Stub.class
xxxException.class
...
-------------
suncertify.srv
-------------
Server.class
-------------
suncertify.ui
-------------
XXXXXXXXX.class
XXXXX.class
.....
I bind RemoteDataImpl.class in Server.class,server.jar includes suncertify.db and sunertify.srv,and the main class is Server.class,is it ok?
The result is "XXXX_Stub not found" if I've not set CLASSPATH before I start rmiregistry,but "java -jar runme.jar server" is ok without "XXX_Stub not found".I got confused because client use "XXX_Stub.class" when it runs in server mode too.
I'll try like what you said,maybe I lost something,and I'll change the package structure if needed.
Thank you!George
Best Regards!
Jian
ljk
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>]
Your programs must not require use of command line arguments other than the single mode flag, which must be supported. Your programs must not require use of command line property specifications. All configuration must be done via a GUI, and must be persistent between runs of the program. Such configuration information must be stored in a file called suncertify.properties which must be located in the current working directory.
The mode flag must be either "server", indicating the server program must run, "alone", indicating standalone mode, or left out entirely, in which case the network client and gui must run.
You must not require manual editing of any files by the examiners.
Packaging of Submissions
All elements of your submission must be packaged in a single JAR file. The JAR file must have the following layout and contents in its root:
The executable JAR containing the programs. This must be called runme.jar.
Regards, George
SCJP, SCJD, SCWCD, SCBCD
SJCP 1.4<br /> <br />"Go in there and do the best you can. That's all you can do."<br />Tiger Woods<br /> <br />"Practice is the best of all instructors."<br />Publilius Syrus (b. 42 AD)
Originally posted by George Marinkovich:
the simplest thing to do I think is to have a single executable called runme.jar that can operate in three different modes as described above: standalone, server, and network client.
Hope this helps,
George
[ February 07, 2004: Message edited by: George Marinkovich ]
Originally posted by jian zheng:
And what the test officer will do is to run "java -jar runme.jar server",he need not to start rmiregistry in command line even.
Regards, George
SCJP, SCJD, SCWCD, SCBCD
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|