我使用以下帖子作为指南 - http://supportforums.blackberry.com/t5/BlackBerry-Push-Development/Push-SDK-using-low-level-APIs/td-p/1173007。
类Push.java编译正常。但是当我尝试运行它(java Push)时,我收到以下错误:
java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key use.public.push
at java.util.ResourceBundle.getObject(ResourceBundle.java:374)
at java.util.ResourceBundle.getString(ResourceBundle.java:334)
at net.rim.pushsdk.commons.DefaultPropertyStore.getProperty(DefaultPropertyStore.java:62)
at net.rim.pushsdk.commons.PropertyStore.getBooleanProperty(PropertyStore.java:90)
at net.rim.pushsdk.commons.PushSDKPropertiesImpl.isUsingPublicPush(PushSDKPropertiesImpl.java:345)
at net.rim.pushsdk.pap.control.PapControl.isUsingPublicPush(PapControl.java:176)
at net.rim.pushsdk.pap.PapServiceImpl.push(PapServiceImpl.java:90)
at Push.main(Push.java:46)
nattyp@arya:~/projects/push/test$
我的直接上市是
drwxr-xr-x 3 nattyp nattyp 4096 Aug 25 2007 org
drwxr-xr-x 3 nattyp nattyp 4096 Apr 29 2011 net
-rw-r--r-- 1 nattyp nattyp 12614 Jun 22 11:07 PushSDK.properties
-rw-r--r-- 1 nattyp nattyp 741 Jun 22 11:07 pushsdk-pap-context.xml
-rw-r--r-- 1 nattyp nattyp 1472 Jun 22 11:07 pushsdk-commons-context.xml
-rw-r--r-- 1 nattyp nattyp 8483 Jun 22 11:07 pap_2.1.dtd
-rw-r--r-- 1 nattyp nattyp 8417 Jun 22 11:07 pap_2.0.dtd
-rw-r--r-- 1 nattyp nattyp 2260 Jun 22 11:07 log4j.xml
-rw-r--r-- 1 nattyp nattyp 2646 Jun 22 12:17 Push.class
-rw-r--r-- 1 nattyp nattyp 2257 Jun 22 12:28 Push.java
The org and net directories are the jar extract from pap-1.1.0.16.jar and commons-pushsdk-1.1.0.16.jar.
我错过了什么?