This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
Hi ranchers, can someone do me a huge favor? I spent over 10 hours on this, and with no progress. I want to jar up my assignment and already read how to do it, can someone please tell me a step-by step list of what to do. I have the following directory structure right now. c:\scjd\starting\suncertify\db c:\scjd\starting\suncertify\client c:\scjd\starting\suncetify\server My db.db and policy file are in \starting. I tried to create an executable Jar but with no luck, the output was something like class not found, and i even included all the classpathss. so I hope someone could help me out. Thanks so much in advance.
Here is a batch file that I had that made my two executable jar files for me. Notice that there is a manifest.mf file. This file tells the jar what class has the main method.
Here's my server manifest file
And for those jsut curious, here is my batch file to make the Javadocs
Also this may just be a problem with Windows (or something weird that I did), but I needed a carriage return after the last line before the jar command recognized the "main-class" statement. [ July 02, 2002: Message edited by: Robin Underwood ]
Alex Gregory
Ranch Hand
Joined: Jun 15, 2002
Posts: 46
posted
0
Thanks Mark, but I get the following error: Exception in thread "main" java.lang.NoClassDefFoundError suncertify/client/ClientFrame My manifest file was just 1 line: Main-Class: suncertify.client.ClientFrame I run java -cp c:\scjd\starting -jar client.jar Local inside the c:\scjd\starting directory. I hope someone could see why this is occuring. thanks again
Alex Gregory
Ranch Hand
Joined: Jun 15, 2002
Posts: 46
posted
0
Mark, thanks very much, I figured out the local client jar. Now, the problem is i am trying to set the rmi.server.codebase, but my stubs and skeletons are inside suncertify\server, which is inside server.jar, so my question is can i set the codebase = to the jar file?
Alex Gregory
Ranch Hand
Joined: Jun 15, 2002
Posts: 46
posted
0
Hi, when i try to run the server from c:\testing with the following line i get marshalling exceptions, and i placed my stubs and skeletons into server.jar which has all the other server files. I am going nutz here, can I anyone see what im doing wrong? java -Djava.security.policy=test.policy -D java.rmi.codebase=c:\testing/server.jar -jar server.jar %1 %2
Alex, The problem is not with the server but with the RMI registry. The RMI Registry is unable to locate the _Stub.class files.
Alex Gregory
Ranch Hand
Joined: Jun 15, 2002
Posts: 46
posted
0
Sai, how can I make the RMI registry locate the stub files? And Mark, I havent even ran the client yet, do you think not putting the stubs in the client would cause the server to fail? Before this jarring business everything worked with the skel and stub only located in the server. Thanks, and please continue to help.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.