Take the 2-minute tour ×

I wrote a program which simply output args[0]. If no args is passed to the main, then it will output "Hello World"

class test {
public test(String str) {
public static void main(String[] args){
        args = new String[] { "Hello World" };
    new test(args[0]);

In the .jnlp file, the corresponding part is written as:

<application-desc main-class="test"/>

However, after running this jnlp, it outputs "Hello World"

Can anyone please help me figure out what's the reason?

share|improve this question

closed as too localized by finnw, thkala, SztupY, François Wahl, j0k Jan 2 '13 at 12:53


solved it when deleting the "/" in <application-desc main-class="test"/> –  OneFingerCoder Jun 3 '12 at 20:58
In future, you might validate the JNLP using JaNeLA. It checks things like that, and a lot more besides. –  Andrew Thompson Jun 4 '12 at 1:28
As an aside. Please enter your comment as an answer, & give it a 'tick'. –  Andrew Thompson Jun 4 '12 at 7:14
@OneFingerCoder There's a badge for answering your own question well. It's encouraged behavior here. –  Donal Fellows Jun 4 '12 at 18:02
Thank you all, Andrew and Donal. –  OneFingerCoder Sep 22 '12 at 19:28

1 Answer 1

up vote 1 down vote accepted

I solved it by deleting the / in <application-desc main-class="test"/>

share|improve this answer
