There is a client server architecture already created.. now, I have a .class file and .jar file and I require these to send from the client to the server and store on the server.. I have Implemented something using Class ClassLoader..but the solution is not workin and is completely messed up..
how can I send..?please give an overview to do this..?
Also one more question...........Is class File an Array of bytes(byte )..??
Can anyone please give their suggestions on the above problem.Thank you in advance.
Is the server loading the class and doing some task with it?
Yes after the .class file and .jar file is transferred to the server...the server needs to instantiate that class ( for instantiating it also requires the .jar file)
Joined: Feb 07, 2006
I have figured out how to send a .Class file and load it on the server..
But what to do, for transfering the (Executable) .Jar file from the client to server....any suggestions are welcome..Thanks in advance...
Joined: Feb 07, 2006
Hello friends and moderators,
I know all people replying in this forum are giving their precious time to help forum users and its not proper to ask them to solve queries immediately...but I am stuck up at a very minute spot..so just requesting to reply...
I have posted the query, since 1 and 1/2 days back but yet to get any help Please friends reply to my query.
To Bartender....IS MY TOPIC PLACED IN THE RIGHT FORUM...IF ITS NOT EQUIVALENT PLEASE MOVE THIS THREAD TO AN APPROPIATE ONE........thank you..
I am redefining my problem statement as per you said....
PROBLEM STATEMENT :
I have a Client - Server Architecture and I require to transfer a,(EXECUTABLE).jar file and a .class file( which uses above .JAR file )
I Dont know what to do for .JAR file..
But here is What I Have implemented for transferring .class file from client to server.
On the Server side I am able to receive this byte array,by using ClassLoader, I am Loading this class as follows
I am highlighting the part in which i am getting error..??
Please revert back if you have any other question..Thank you in advance.
Joined: Mar 22, 2005
I don't understand how this code transfers a class file over the network, or how it is supposed to instantiate it. Especially amazing to me is that somewhere in between the contents of the class file are converted to character data (by storing them in a StringBuffer), and it still works afterwards.
Be that as it may, I would use any standard method of transferring files (e.g. the ones mentioned here) to the server, and once the files (.class and .jar) are there, create a classloader that knows where to look for loose class files files, and which also knows how to look for class files inside of jar files.