Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #38303 > unrolled thread

Need to modify a legacy closed app

Started byMichael Keith <mjkeith@gmx.de>
First post2018-05-30 21:38 +0200
Last post2018-05-31 20:32 -0400
Articles 5 — 3 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  Need to modify a legacy closed app Michael Keith <mjkeith@gmx.de> - 2018-05-30 21:38 +0200
    Re: Need to modify a legacy closed app Arne Vajhøj <arne@vajhoej.dk> - 2018-05-30 21:19 -0400
      Re: Need to modify a legacy closed app Michael Keith <mjkeith@gmx.de> - 2018-05-31 13:15 +0200
        Re: Need to modify a legacy closed app Martin Gregorie <martin@mydomain.invalid> - 2018-05-31 21:50 +0000
        Re: Need to modify a legacy closed app Arne Vajhøj <arne@vajhoej.dk> - 2018-05-31 20:32 -0400

#38303 — Need to modify a legacy closed app

FromMichael Keith <mjkeith@gmx.de>
Date2018-05-30 21:38 +0200
SubjectNeed to modify a legacy closed app
Message-ID<v9ttgdld4tiodnldauf1eid79jgdnd61pl@4ax.com>
Hello out there,
I am tasked with modifying a legacy app which consists of an .exe file
and several hundred .jar files. Is is launched by starting the .exe,
which then - somehow - initialises the whole darn thing. This presents
the first difficulty, as I have no idea what the 'main' .jar file is.

The task at hand consists of adding one button (or a clickable image
or some such) plus the action to be eventually performed to a certain
pane - so all I need is the name (or probably the class hierarchy) of
this particular pane.

I am hoping for a tool / class which, when hovering over a certain gui
element knows (and can display) this hierarchy. I could then inject
the code to start this class in some suitable constructor and be a lot
farther.

If anyone here knows of a way to achieve what I am after this would be
highly appreciated.

Oh, one more thing maybe: I am not a Java guy at all (knowing about
code injection only because I read an article about it some years ago
- and carelessly mentioned it to my boss when discussing our problem,
which caused it to land right in my lap), so you might consider using
"simple language" when answering. :)

Thanks and best regards
M'

[toc] | [next] | [standalone]


#38304

FromArne Vajhøj <arne@vajhoej.dk>
Date2018-05-30 21:19 -0400
Message-ID<peniiv$aje$1@gioia.aioe.org>
In reply to#38303
On 5/30/2018 3:38 PM, Michael Keith wrote:
> I am tasked with modifying a legacy app which consists of an .exe file
> and several hundred .jar files. Is is launched by starting the .exe,
> which then - somehow - initialises the whole darn thing. This presents
> the first difficulty, as I have no idea what the 'main' .jar file is.
> 
> The task at hand consists of adding one button (or a clickable image
> or some such) plus the action to be eventually performed to a certain
> pane - so all I need is the name (or probably the class hierarchy) of
> this particular pane.
> 
> I am hoping for a tool / class which, when hovering over a certain gui
> element knows (and can display) this hierarchy. I could then inject
> the code to start this class in some suitable constructor and be a lot
> farther.
> 
> If anyone here knows of a way to achieve what I am after this would be
> highly appreciated.
> 
> Oh, one more thing maybe: I am not a Java guy at all (knowing about
> code injection only because I read an article about it some years ago
> - and carelessly mentioned it to my boss when discussing our problem,
> which caused it to land right in my lap), so you might consider using
> "simple language" when answering. :)

Check if you have the source code and build scripts somewhere.

Yes => change code, rebuild, test and deploy.

No =>

1) Check if you have legal right to reverse engineer and modify code.
2) Get a Java decompiler and generate source code from the Java byte code.
3) change code, rebuild, test and deploy.

Arne

[toc] | [prev] | [next] | [standalone]


#38306

FromMichael Keith <mjkeith@gmx.de>
Date2018-05-31 13:15 +0200
Message-ID<vplvgd5f36lidfqhfvmtrjmp2esvh8d22l@4ax.com>
In reply to#38304
On Wed, 30 May 2018 21:19:29 -0400, Arne Vajhøj <arne@vajhoej.dk>
wrote:
>On 5/30/2018 3:38 PM, Michael Keith wrote:
>> I am tasked with modifying a legacy app which consists of an .exe file
>> and several hundred .jar files. Is is launched by starting the .exe,
>> which then - somehow - initialises the whole darn thing. This presents
>> the first difficulty, as I have no idea what the 'main' .jar file is.
>
>Check if you have the source code and build scripts somewhere.
>
>Yes => change code, rebuild, test and deploy.
>
>No =>
>
>1) Check if you have legal right to reverse engineer and modify code.
>2) Get a Java decompiler and generate source code from the Java byte code.
>3) change code, rebuild, test and deploy.
>
>Arne
Hi Arne,
thanks for answering.
No, we don't have the sources. As for the legal stuff that's my boss'
concern.
I know of java decompilers, but looking at the sheer number of .jar
files I was hoping for a short-cut.
Any other idea maybe?

Best regards
M'

[toc] | [prev] | [next] | [standalone]


#38322

FromMartin Gregorie <martin@mydomain.invalid>
Date2018-05-31 21:50 +0000
Message-ID<pepqo0$1ks$1@news.albasani.net>
In reply to#38306
On Thu, 31 May 2018 13:15:26 +0200, Michael Keith wrote:

> On Wed, 30 May 2018 21:19:29 -0400, Arne Vajhøj <arne@vajhoej.dk> wrote:
>>On 5/30/2018 3:38 PM, Michael Keith wrote:
>>> I am tasked with modifying a legacy app which consists of an .exe file
>>> and several hundred .jar files. Is is launched by starting the .exe,
>>> which then - somehow - initialises the whole darn thing. This presents
>>> the first difficulty, as I have no idea what the 'main' .jar file is.
>>
>>Check if you have the source code and build scripts somewhere.
>>
>>Yes => change code, rebuild, test and deploy.
>>
>>No =>
>>
>>1) Check if you have legal right to reverse engineer and modify code.
>>2) Get a Java decompiler and generate source code from the Java byte
>>code.
>>3) change code, rebuild, test and deploy.
>>
>>Arne
> Hi Arne,
> thanks for answering.
> No, we don't have the sources. As for the legal stuff that's my boss'
> concern.
>
In that case, assuming that by "that's my boss concern" you mean that he 
is sorting out the legal situation, you shouldn't do anything until he 
has clarified the legal position.


-- 
Martin    | martin at
Gregorie  | gregorie dot org

[toc] | [prev] | [next] | [standalone]


#38323

FromArne Vajhøj <arne@vajhoej.dk>
Date2018-05-31 20:32 -0400
Message-ID<peq471$jqi$1@gioia.aioe.org>
In reply to#38306
On 5/31/2018 7:15 AM, Michael Keith wrote:
> On Wed, 30 May 2018 21:19:29 -0400, Arne Vajhøj <arne@vajhoej.dk>
> wrote:
>> On 5/30/2018 3:38 PM, Michael Keith wrote:
>>> I am tasked with modifying a legacy app which consists of an .exe file
>>> and several hundred .jar files. Is is launched by starting the .exe,
>>> which then - somehow - initialises the whole darn thing. This presents
>>> the first difficulty, as I have no idea what the 'main' .jar file is.
>>
>> Check if you have the source code and build scripts somewhere.
>>
>> Yes => change code, rebuild, test and deploy.
>>
>> No =>
>>
>> 1) Check if you have legal right to reverse engineer and modify code.
>> 2) Get a Java decompiler and generate source code from the Java byte code.
>> 3) change code, rebuild, test and deploy.

> No, we don't have the sources. As for the legal stuff that's my boss'
> concern.
> I know of java decompilers, but looking at the sheer number of .jar
> files I was hoping for a short-cut.
> Any other idea maybe?

Maybe the name of the main GUI jar file reveal what it is.

Maybe that jar files manifest has a Main-Class directive.

You can also try moving the jar files one by one and see
when the EXE can no longer start the GUI.

But even if you are lucky and find that then you will still
need to decompile classes in that jar file.

Arne

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web