diff options
Diffstat (limited to 'netx')
-rw-r--r-- | netx/net/sourceforge/jnlp/ResourcesDesc.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/netx/net/sourceforge/jnlp/ResourcesDesc.java b/netx/net/sourceforge/jnlp/ResourcesDesc.java index 988c55b..a63c3b0 100644 --- a/netx/net/sourceforge/jnlp/ResourcesDesc.java +++ b/netx/net/sourceforge/jnlp/ResourcesDesc.java @@ -72,11 +72,20 @@ public class ResourcesDesc { } public static JARDesc getMainJAR(List<JARDesc> jars) { + JARDesc markedMain = null; for (JARDesc jar : jars) { if (jar.isMain()) { - return jar; + if (markedMain == null){ + markedMain = jar; + } else { + //more then one main jar specified. It stinks. Return null to die later null; + throw new RuntimeException("Multiple main JARs specified, refusing to continue."); + } } } + if (markedMain!=null){ + return markedMain; + } if (jars.size() > 0) { return jars.get(0); |