0

I have exported and signed a runnable jar from eclipse and created a jnlp file. The app launches fine if the java console is set to "show console" in java settings but the app never launches if the java console is set to hide which is the default setting. The console does not show any error on launch when it is visible.

Do anyone know what might cause this behavior?

Beneath is my jnlp file if it helps.

<?xml version="1.0" encoding="UTF-8"?>
   <jnlp spec="1.0+" codebase="https://myserver.com" href="launcher.jnlp">
   <information>
      <title>App name</title>
      <vendor>Company name</vendor>
      <icon href="res/image.png"/>
      <icon kind="splash" href="res/image.png"/>
   </information>
   <resources>
      <!-- Application Resources -->
      <j2se version="1.8.0_131-b11" href=
       "https://java.sun.com/products/sautdl/j2se"/>
      <jar href="res/myjar.jar"
        main="true" />
   </resources>
   <security>
      <all-permissions/>
   </security>
   <application-desc
       name="App name"
       main-class="com.comp.app.main">
   </application-desc>
   </jnlp>
Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
gallow
  • 21
  • 1
  • 7
  • Haven't heard of anything similar... searched and found a fixed bug back in JDK6, where a hidden console will be filled up and eventually use up the heap (https://bugs.openjdk.java.net/browse/JDK-6926432). I think you should try debugging your application, you can refer to this: https://stackoverflow.com/questions/10899675/debugging-jnlp-started-application. – KC Wong May 23 '17 at 03:10
  • Thank you. I think the problem came from disposing a login frame and only having a splash screen in the startup. Without a frame the process would die but when the java console was enabled, it would keep the process alive until a new frame was created after the splash screen. Placing a frame at position -100, -100 with size 0,0 during the splash screen resolved the problem. – gallow May 23 '17 at 06:48
  • @gallow you can also post this as an answer to your own question. – Stefan Hegny May 23 '17 at 09:13

1 Answers1

0

For anyone interested, here is how the issue was resolved.

I think the problem came from disposing a login frame and only having a splash screen in the startup. Without a frame the process would die but when the java console was enabled, it would keep the process alive until a new frame was created after the splash screen. Placing a frame at position -100, -100 with size 0,0 during the splash screen resolved the problem.

Not the nicest solution but it fixed the problem.

gallow
  • 21
  • 1
  • 7