|
|
Welcome to the Java Forums.
You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:
- have access to post topics
- communicate privately with other members (PM)
- not see advertisements between posts
- have the possibility to earn one of our surprises if you are an active member
- access many other special features that will be introduced later.
Registration is fast, simple and absolutely free so please, join our community today!
If you have any problems with the registration process or your account login, please contact us.
|
|

04-10-2008, 01:13 PM
|
|
Member
|
|
Join Date: Apr 2008
Posts: 9
|
|
|
Generate an event to another java application
I'm not an advanced user but this question is directed to advanced users
I have an already created java application, which code i can't modify. My purpose is create another application which can control the first one.
I mean, the first one have a button called RUN and an actionPerformed method associated to it. Then i have to do that this event is called from the other application whitout clicking this button in the first one.
I´m spanish so my english is no so good. Sorry!
|
|

04-10-2008, 01:16 PM
|
 |
Senior Member
|
|
Join Date: Apr 2008
Location: Delhi(India)
Posts: 249
|
|
|
Are you using a web application or else. Please give some more details about your question.
sanjeev
|
|

04-10-2008, 09:12 PM
|
|
Member
|
|
Join Date: Apr 2008
Posts: 9
|
|
|
No. The application that i'm trying to "control" is a .jar file, is not a web application, you can run it in your computer just having Java Virtual Machine and executing the .jar file.
My purpose is to know if is possible to control one application already created from other application.
If you need more details please tell me
|
|

04-11-2008, 08:17 AM
|
 |
Senior Member
|
|
Join Date: Apr 2008
Location: Delhi(India)
Posts: 249
|
|
|
Can you send that jar.. so that i can check what exactly it is.
sanjeev
|
|

04-11-2008, 08:42 AM
|
 |
Moderator
|
|
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 2,405
|
|
Are you trying to execute a jar file from a button event? I think because of the jar you say that in the first post,
I have an already created java application, which code i can't modify.
Is that right. If not correct me.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Has someone helped you? Then you can To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. their helpful post.
Want to make your IDE the best? To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. (Close on July 13, 2008)
|
|

04-14-2008, 03:43 PM
|
|
Member
|
|
Join Date: Apr 2008
Posts: 9
|
|
|
No, Eranga.
I need to execute a button of an application from another different application. It means, i need to generate the onClick button event from my application to annother one.
|
|

04-16-2008, 09:40 AM
|
 |
Moderator
|
|
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 2,405
|
|
|
What you mean generate onClick button event? I'm not clear what you say here pal.
Again, did you want to generate a onClick button event on a application by another application?
__________________
Use an appropriate Subject. "Help, urgent!" isn't one. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Has someone helped you? Then you can To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. their helpful post.
Want to make your IDE the best? To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. (Close on July 13, 2008)
|
|

04-16-2008, 02:35 PM
|
|
Member
|
|
Join Date: Apr 2008
Posts: 9
|
|
|
Yes. I want to generate an event to one application from another one.
The first application has a Botton which has associated an actionPerformed event. I'll need to call this event from the other application.
I think it must be possible but i don't know how!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!
HELP!!!
|
|

04-16-2008, 02:43 PM
|
 |
Moderator
|
|
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 2,405
|
|
|
Did you work on any Java IDE?
__________________
Use an appropriate Subject. "Help, urgent!" isn't one. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Has someone helped you? Then you can To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. their helpful post.
Want to make your IDE the best? To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. (Close on July 13, 2008)
|
|

04-16-2008, 03:26 PM
|
|
Member
|
|
Join Date: Apr 2008
Posts: 9
|
|
|
I'm working with jBuilder.
|
|

04-16-2008, 03:27 PM
|
|
Member
|
|
Join Date: Apr 2008
Posts: 9
|
|
|
but i can work with any other java IDE if it's better
|
|

04-16-2008, 03:40 PM
|
 |
Moderator
|
|
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 2,405
|
|
|
No no, I'm not worried about your IDE. My question is that, when you create a actionPerformed method, what is the access modifier of it? I think it is private.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Has someone helped you? Then you can To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. their helpful post.
Want to make your IDE the best? To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. (Close on July 13, 2008)
|
|

04-16-2008, 03:48 PM
|
|
Member
|
|
Join Date: Apr 2008
Posts: 9
|
|
|
OK!
The application that has the button is already created and i can't modify it. But i saw its code decompiling with an application called JAD.
Then, it has a class named MyActionListener which catch all events and watches which is the event type.
The code of this class is
private class Osejs$MyActionListener
implements ActionListener
{
public void actionPerformed(ActionEvent _evt)
{
String cmd = _evt.getActionCommand();
if(cmd.equals("New"))
{
if(!isEmersionConnected() && isApplet)
{
Args[0] = cmd;
if(htmlWindow != null)
htmlWindow.call("ejsCommand", Args);
}
if(readOnly)
{
JOptionPane.showMessageDialog(Osejs.access$500(Ose js.this), Osejs.access$600().getString("Osejs.ReadOnly.Messa ge"), Osejs.access$600().getString("Osejs.ReadOnly.Title "), 1);
return;
and continuous. So, i need from the other application, to generete an event that this class can capture and treat it
|
|

04-16-2008, 03:50 PM
|
|
Member
|
|
Join Date: Apr 2008
Posts: 9
|
|
|
If i don't explain right in english please tell me and i'll try do it better
|
|

04-16-2008, 03:53 PM
|
 |
Moderator
|
|
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 2,405
|
|
|
Ok, Here what happened is, that ActionLitener deals with the ActionEvent. As you can see in the above code it's get the action command, that is the text of your control. So try to do the same thing on the other class and check it on this class. If you pass the test, simply call the correct functions. I don't think you can generate the code there.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Has someone helped you? Then you can To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. their helpful post.
Want to make your IDE the best? To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. (Close on July 13, 2008)
|
|

04-16-2008, 03:58 PM
|
|
Member
|
|
Join Date: Apr 2008
Posts: 9
|
|
|
you say that
So try to do the same thing on the other class and check it on this class.
But it implies to change the code of the program. And i can't do it. I only can create another program to controll it. You know what i mean????? Maybe is possible that i don´t understand you too.
|
|

04-23-2008, 07:03 PM
|
 |
Senior Member
|
|
Join Date: Apr 2008
Location: Canada
Posts: 183
|
|
|
You have to bypass the whole GUI code in the jar file. If you are lucky enough the classes that do the job when the button is clicked are public and have public interfaces. In that situation you can call them directly from your application and use the jar file as a library. If the API is not public you might still stand a chance by declaring your classes in the same packages as the classes you want to call. Hope this helps.
__________________
Daniel @ [ To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. ]
Language is froth on the surface of thought
|
|

05-12-2008, 02:55 PM
|
|
Member
|
|
Join Date: May 2008
Posts: 4
|
|
|
yes. i am using web application. i want pagination in jsp.
|
|

05-12-2008, 02:57 PM
|
|
Member
|
|
Join Date: May 2008
Posts: 4
|
|
|
i want immediately code for pagnation in jsp
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|