File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes executable jar file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "executable jar file" Watch "executable jar file" New topic
Author

executable jar file

ravi janap
Ranch Hand

Joined: Nov 04, 2000
Posts: 389
Hi
Do we need provide the jar commands to create the client and server jar in the README file?
If Yes, Currently my directory structure is as follows
classes/suncertify/client/*.class
classes/suncertify/db/*.class
classes/suncertify/server/*.class
classes/META-INF/MANIFEST.MF
The problem I am facing that I am creating jar below classes directory and while creating the executable jar for client I need to mention the mention the main class as
Main-Class: suncertify.client.FBNTable
and while creating the server, I have to mention the main class as
Main-Class: suncertify.server.RemoteDataClient
My question is can a manifest file contain two main classes ?
Thanks
Ravi


SCJP, SCJD, SCWCD, SCBCD, SCEA
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
Hi janapareddy,

Do we need provide the jar commands to create the client and server jar in the README file?

No.

My question is can a manifest file contain two main classes ?

No. There can only be one main class. Otherwise, how would the java interpreter know which main() method to execute?
Hope this helps,
Michael Morris


Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
ravi janap
Ranch Hand

Joined: Nov 04, 2000
Posts: 389
Hi Micheal
Do we need to already create the client.jar and server.jar file and give it to the examiner so that he / she could directly execute the application and do we need to provide the commands for the examiner to create the jar files ?
Thanks
Ravi
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
Hi Ravi,

Do we need to already create the client.jar and server.jar file and give it to the examiner so that he / she could directly execute the application ...

Yep.

... and do we need to provide the commands for the examiner to create the jar files ?

Nope.
Michael Morris
ravi janap
Ranch Hand

Joined: Nov 04, 2000
Posts: 389
Hi Michael
I have created the client.jar file and server.jar file.
The problem I am facing now is that when I execute the application in Intelli J IDE, My client GUI is able to pick data from the remote database. However when I executed the following commands :
start rmiregistry
java -jar server.jar
java -jar client.jar
the client gui is not able to pick data from the remote database. Have I missed on something ?
Thanks
Ravi
ravi janap
Ranch Hand

Joined: Nov 04, 2000
Posts: 389
Hi
This is my code for DataClientFactory

When I execute the code as above, I get RemoteException however when I try to execute it in IDE , I get the following output
m_mode: remote
make connection to remote
remote server reference: suncertify.server.RemoteDataClient_Stub[RemoteStub [ref: [endpoint:[127.0.0.1:1033](remote),objID:[17d257:f05b4d1de8:-8000, 0]]]]
DataClientFactory before returning remote/local reference : suncertify.server.RemoteDataClient_Stub[RemoteStub [ref: [endpoint:[127.0.0.1:1033](remote),objID:[17d257:f05b4d1de8:-8000, 0]]]]
m_client reference obtained in FBNTable: suncertify.server.RemoteDataClient_Stub[RemoteStub [ref: [endpoint:[127.0.0.1:1033](remote),objID:[17d257:f05b4d1de8:-8000, 0]]]]
FBNTableData
setInitialData
m_client: suncertify.server.RemoteDataClient_Stub[RemoteStub [ref: [endpoint:[127.0.0.1:1033](remote),objID:[17d257:f05b4d1de8:-8000, 0]]]]
Please provide a solution.
Thanks
Ravi
ravi janap
Ranch Hand

Joined: Nov 04, 2000
Posts: 389
Hi
I resolved the solution after I included the stub in my client jar file.
Thanks
Ravi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: executable jar file
 
Similar Threads
executing jar files and inner class errors
the README.txt file
README.TXT : file listing
How to create/run client.jar
URLyBird: runme.jar