doubts about serialization of *Listener enent handler in java ...
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
doubts about serialization of *Listener enent handler in java ...
could be something silly ... but anyway are there any ways to serialize an event handler in java , eg. and more specifically(in my case) a MouseListener ??
i could write and read objects with ObjectInput/ObjectOutput as JFrames , JButtons and such but the events handlers that came with them doesnt work ... have tried writing/reading Listeners instead but only able to generate errors while reading them ...
does anybody got any links to answers on the net for this problem ??
initially i was thinking of sending the whole frame(including panels/buttons/editbox that came with it) across a network , and this frame was in a class which i wrote for another program , but it would be great if those event handlers could be sent together with the frame , at least i dont need to rewrite these handlers in the client ... seems that event handlers are kind of unserializable , i guess that probably they got nothing to do with object persistence and states(note :: as only how i understand them presently and i believe serializations are more than just that) ...
>> " tell us more about what you are trying to achieve ..."
eg . i wanted to send an application across a network to a client , and the client side doesnt need to have any of the application files(either source or class) installed on their system , not even their configuration files and no writing of files on their disk ... i mean the server side decides and stores everthing according to each client's identity (hopefully so) ... most of the events(eg. buttons clicks , editbox changed and such) will generate a request back to the server and the server will react appropriately and send back something(eg. a dialog or changes in the class fields) ... all the clients need to install is just a jvm ...
nothing much ... i know its silly but just typically those "nothing better to do" kind of unpractical "convoluted" thinkering(you get what i mean)...
//ok ... since its a rather long posting(i didnt expected that) ... i have one more doubt ... how to send and load a jvm across a network to a client and run an application in it , i mean the client doesnt need to install java at all ... is it possible ??
probably trying hard to make myself clearer a bit and probably jecking up my post counts or something ...
i'm not really good at saying things , so bear with me ... >>" all the clients need to install is just a jvm ..."
not exactly ... you still need to install the client itself ... preferably a simple client , as simple and small as possible , and its just a guiless console application ... as for the reason why i'm thinking of "send and load a jvm across a network to a client[actually its a client machine] and run an application in it" is that ... i wouldnt like to be in a situation when i'm installing bash and i was asked to satisfy the missing dependency of java runtime ... and thats really weird ...
hmm ... but how to run the a java console client app in the first place ... i donno ...
never mind ... for the time being i recently got a sudden interest(probably a shorter one) in dinosaurs ever since i came back from the science center last weekend(sunday) ... i mean i didnt know that modern birds are actually kind of true dinosaurs !! fascinating !! loving funny and interesting facts in general ...
btw ... during last saturday , i spent a great time in a live sesame street concert show over here(dont laugh) ...
You will have to install java on the client side unless it is a web application written in java. I don't think that what you are trying to achieve is possible.
ok ... i think i wont be searching for ways to transfer/load java on the client side anymore ... now i'm kind of left with the "requirments" of not installing any client application specific configuration files(these will reside on the server) and also no installations of any other java applications files(these will also reside on the server) ... so there will only be a plain java console networking client(hopefully as plain as possible though) and a normal jvm installation on the client machine ... great , at least i dont have to keep bother about one more thing and can carry on with other stuffs ...
btw ... as for your comment of "unless it is a web application written in java" ... i'm not quite sure about the meaning ... does it means i dont have to install java if theres a web application written in java ?? for example which application ?? ... i just want to make very sure i'm not missing something obvious ...
btw ... as for your comment of "unless it is a web application written in java" ... i'm not quite sure about the meaning ... does it means i dont have to install java if theres a web application written in java ?? for example which application ?? ... i just want to make very sure i'm not missing something obvious ...
I think he means the server backend is written in java so the client just goes to a website to interact with the application.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.