I am running the following code on Ubuntu 10.10 using OpenJDK 1.6.0_18:
package mypkg; public class MyTest { public static void main(final String[] args) { System.out.println(args.length + " argument(s)"); for (final String arg : args) { System.out.println(arg); } } }
After compiling in the Jar, I am completely puzzled why executing the following command from the terminal returns 0 argument(s) :
java -jar mytest.jar is a test
This is my interpretation of Java docs that says:
java [options] -jar file.jar [argument ...]
I almost feel like I'm entering the wrong command with the wrong command. What gives?
Edit: MANIFEST.MF contains:
Manifest-Version 1.0 Created-By: 1.6.0_18 (Sun Microsystems Inc.) Main-Class: mypkg.Starter Class-Path: .
source share