Ok so I validated my java version by forcing the commandline utility to use 3 different versions.
First I read the current version in use:
D:\C2DM>java -version
Result:
java version "1.7.0_01"
Java(TM) SE Runtime Environment (build 1.7.0_01-b08)
Java HotSpot(TM) Client VM (build 21.1-b02, mixed mode, sharing)
java version "1.7.0_01" allows for the result from the commandline utility:
D:\C2DM>java -cp b4a_c2dm.jar anywheresoftware.b4a.c2dm.C2DM send DEVICENAME "this is a test"
Result:
java.lang.RuntimeException: java.io.IOException: Server returned HTTP response code: 401 for URL:
https://android.apis.google.com/c2dm/send
at anywheresoftware.b4a.c2dm.C2DM.sendMessageTo(C2DM.java:66)
at anywheresoftware.b4a.c2dm.C2DM.sendMessageTo(C2DM.java:63)
at anywheresoftware.b4a.c2dm.C2DM.main(C2DM.java:228)
So then I try version 1.6.
D:\C2DM>java -version:1.6 -cp b4a_c2dm.jar anywheresoftware.b4a.c2dm.C2DM send DEVICENAME "this is a test"
Result:
java.lang.RuntimeException: java.io.IOException: Server returned HTTP response code: 401 for URL:
https://android.apis.google.com/c2dm/send
at anywheresoftware.b4a.c2dm.C2DM.sendMessageTo(C2DM.java:66)
at anywheresoftware.b4a.c2dm.C2DM.sendMessageTo(C2DM.java:63)
at anywheresoftware.b4a.c2dm.C2DM.main(C2DM.java:228)
So then I try version 1.5.
D:\C2DM>java -version:1.5 -cp b4a_c2dm.jar anywheresoftware.b4a.c2dm.C2DM send DEVICENAME "this is a test"
Result:
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
It appears that version 1.7 and 1.6 are operating the same. So I don't think Java version is at fault here.
I know that the config file is ok because of the responses I get when I make changes to the values.
It would be really nice to see the commandline utility work. It has tons of value for my project.