"Eagles may soar but weasels don't get sucked into jet engines" SCJP 1.6, SCWCD 1.4, SCJD 1.5,SCBCD 5
Originally posted by Bilal Ali:
, its basically a Java swing application,now we want some validations to be applied ................
1. Reverse engineer the class files using the decompilers available
Now to the more important problem that why do I need to write such a program,actually dear friend our organization purchased a software(lets say it XYZ Product) from a vendor, its basically a Java swing application,now we want some validations to be applied on certain values which are enetered in the text feild,the vendor now is not ready to do it for us,he has also refused to give us the source code or any API by which we could have interacted with this software,so we thaught that it would be a good idea to develop a Java program which would be running in memory like a windows process/service when the user enters Ctrl-F1 than our program will trap this event,issue Ctrl-C,after this text would automatically be shifted in clipboard, than gets the selected text from the clipboard and than assigned it to the string,once we have this value in our hand than we can apply necessay validations on it.
You could do it in using C++ etc i.e. treat the swing as just another windows window , it can hook the keyboard and fake events whatever you could JNI back into java.....
To my mind your proposed solution is not a very good one
but sir we dont have any other way out...thats the only solution we could have found....if you can suggest some better solution than we would really be thankful to you.... and yes the data which we enter ends up in a database but as a requirement before letting the data to the database we have to apply some validations on it.
Originally posted by Paul Sturrock:
This is very bad advice unless the licence of this applciation allows it.
Point 1.
Our organization purchased a software(lets say it XYZ Product) from a vendor, ..........
Point 2.
the vendor now is not ready to do it for us,he has also refused to give us the source code or any API by which we could have interacted with this software.................
Originally posted by Devesh H Rao:
If I purchase something, i expect due support in maintanence and enhancements. The vendor is behaving like a guy with a gun at a hold up, any ways this is something for the legal department to handle.
And if you go through my post, i mentioned extending the classes not fiddling around with the reverse engineered source. Reverse engineering would not have been suggested by me if the vendor had provided proper api's and documentation which they are supposed to do along with a product which they obviously haven't.
... we want some validations to be applied on certain values which are entered in the text field,the vendor now is not ready to do it for us,he has also refused to give us the source code or any API by which we could have interacted with this software,so we thought that it would be a good idea to develop a Java program which would be running in memory like a windows process/service ...
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Originally posted by Ulf Dittmer:
Well, you suggested using a decompiler. Just about any software license (and remember, most software is licensed, not sold) explicitly forbids this. It makes no difference how bad the service is that the software vendor provides. One may be able to take the vendor to court over this (if they don't provide something that the contract stipulates), but the license is still binding.
Originally posted by Stefan Wagner
@Devesh H Rao:
java.lang.String is final, so extending it isn't possible.
its basically a Java swing application,now we want some validations to be applied on certain values which are enetered in the text feild
@Devesh H Rao:
java.lang.String is final, so extending it isn't possible.
It was used for illustrating a point, the point was important not the example which I thought was pretty implicit. Anyways my bad it does not seem to be the case. next time onwards I will be careful with that as well.
its basically a Java swing application,now we want some validations to be applied on certain values which are enetered in the text field
And also the link provided contains a method to work on any clipboard data, I guess it will not work in this case as the data is related to a specific textfield or textfield's whatever the case may be.
use something like triggers to convert that dat into what your applciation's business rules require....
Bilal, a question for you, is the swing UI resizable
Why does'nt Java allow us to access any kind of active window running on the screen, if could access any active window with VB,C++ than whats the problem with Java, and are there any kind of APIs by which we can access or any third party open source avaiable by which we can interact with active windows, because if there is any such stuff than we could easily use it to aceess the Java Swing application and any selected text in it,because this Java Swing application is actually the active window,any idea or some better solutions than please reply I would be waiting for your suggestions.....Thanks in advance
Originally posted by Bilal Ali:
Please some one reply that how do I trap the key stroke of Ctrl-F3 in Java when my program is running in the back end inside the Windows process, it seems that not many members are intersted in replying,please guide me as all of you have guided me in the past,please reply soon.... I would be waiting for your precious replies.
Thanking You,
Bilal Ali.
"Eagles may soar but weasels don't get sucked into jet engines" SCJP 1.6, SCWCD 1.4, SCJD 1.5,SCBCD 5
Good heavens! What have you done! Here, try to fix it with this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|