6

I have a legacy Java application that uses Java 1.3

It works fine on windows Xp but now I need to make it run on windows 7.

I have installed the 1.3 jdk however when it first loads, the app won't render properly. Bits of the screen just show grey background, selecting buttons won't load a new screen etc.

I do know watching the output from the app it just purely graphics not rendering properly.

However if I press "Ctrl-alt-delete" and then just press "cancel" the software runs perfectly. If I have a second monitor plugged in, it runs perfectly.

Has anyone got any suggestions how to make app run perfectly first time.

Thanks

Display Name
  • 1,025
  • 2
  • 15
  • 34
  • Have you tried running it with an up-to-date java runtime? – SpaceTrucker Sep 03 '15 at 13:00
  • Yes I have tried it with Java 6 and Java 8, in both cases issue remained – Display Name Sep 03 '15 at 13:19
  • Sounds like a repainting issue. What happens when you minimize and restore the window? – Joeri Hendrickx Sep 03 '15 at 14:31
  • If I minimise and restore no difference, if I press "ctrl alt delete " and then cancel it works perfect till I power down pc – Display Name Sep 03 '15 at 14:50
  • 2
    http://stackoverflow.com/a/26610279/4632333 can be a solution. – mies Sep 08 '15 at 11:13
  • Check on which thread the screens are built. Is it the AWT thread or a different thread. Perhaps you can call `invalidate()` on the top level component or frame after it has been initialized? Of course a small program to reproduce the problem would help us solving the problem. – gogognome Sep 08 '15 at 12:25
  • This sounds to me like a hardware issue. Have you reproduced this on any other machines running Windows 7? @miles comment points to a couple of workarounds, have you tried any of them?. – John Kuhns Sep 11 '15 at 12:05
  • Can you share details on how you're starting the app? Just to make sure it is picking up the Java 1.3 JRE. Just installing JDK 1.3 might not necessarily start the app with Java 1.3. One way to check is to run VIsualVM on the machine and check the Java version of your legacy app's process (which should automatically show up in VisualVM). The version of Java used by the legacy app can also be checked via command line - but it's easier with VisualVM. – nhylated Sep 12 '15 at 00:01

1 Answers1

1

Firstly, update your java, no excuses not to.

You can try the hack of resizing your component to a different size and then back again. I find this is the best way to make sure that swing doesn't do this sort of mischief with black squares here and there.

These things happen from time to time with non native tools for desktop development as opposed to those specifically designed for the targeted platform.

Derrops
  • 7,651
  • 5
  • 30
  • 60