ojdkbuild / ojdkbuild

Community builds using source code from OpenJDK project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Main-Class issues

patris70 opened this issue · comments

Hi,

As Info, Oracle Java has not this Problem, but Icedtea-Web has (version does not matter).

If applet-desc or application-desc Element in JNLP File has Main-Class Attributes and Attributes Values ends with ".class", Icedtea-Web shows Fatal Error and cannot load/start Application. For example works with Main-Class ="misc.AccessibleScrollDemo" but not with Main-Class ="misc.AccessibleScrollDemo.class".

Same Problem, if applet-desc or application-desc Element in JNLP File has Main-Class Attributes and for Attributes Value used "/" (slash) and not "." (dot).
For example ==> Main-Class ="misc/AccessibleScrollDemo"

Same Problem, if JNLP File has not applet-desc or application-desc Element, but JAR File has Main-Class in MANIFEST.MF File.

Maybe we can using this code in JNLPClassLoader.java File:

if(mainClass.endsWith(".class")) { mainClass= mainClass.substring(0, mainClass.length() - 6); } if(mainClass.contains("/")) { mainClass = mainClass.replace("/", "."); }

Likewise #95, going to include this for October.

Sorry for delay, this fix is added now and going to be included into 8u232 build. You may also consider bringing it to AdoptOpenJDK/IcedTea-Web.

Fixed in 8u232, closing the issue.