Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/383.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
能够在一个系统上运行java应用程序,但不能在另一个系统上运行_Java_Swing_Java 7_Twitter4j - Fatal编程技术网

能够在一个系统上运行java应用程序,但不能在另一个系统上运行

能够在一个系统上运行java应用程序,但不能在另一个系统上运行,java,swing,java-7,twitter4j,Java,Swing,Java 7,Twitter4j,我的JavaSwing应用程序面临着一种奇怪的情况。在我的电脑(win-7 x64和jre-7)中,它工作正常。我可以在我的系统上运行jar文件,但在安装了jre7的windows xp机器上,它会给出以下错误跟踪: C:\Documents and Settings\HOME\Desktop\TweetTweetAsMuchYouTweet_jar>java -jar Tw eetTweetAsMuchYouTweet.jar 401:Authentication credentials

我的JavaSwing应用程序面临着一种奇怪的情况。在我的电脑(win-7 x64和jre-7)中,它工作正常。我可以在我的系统上运行jar文件,但在安装了jre7的windows xp机器上,它会给出以下错误跟踪:

C:\Documents and Settings\HOME\Desktop\TweetTweetAsMuchYouTweet_jar>java -jar Tw
eetTweetAsMuchYouTweet.jar
401:Authentication credentials (https://dev.twitter.com/pages/auth) were missing
or incorrect. Ensure that you have set valid consumer key/secret, access token/
secret, and the system clock is in sync.
Failed to validate oauth signature and token

Relevant discussions can be found on the Internet at:
        http://www.google.co.jp/search?q=10f5ada3 or
        http://www.google.co.jp/search?q=0276a2ab
TwitterException{exceptionCode=[10f5ada3-0276a2ab], statusCode=401, message=null
, code=-1, retryAfter=-1, rateLimitStatus=null, version=3.0.5}
        at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:16
2)
        at twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.j
ava:61)
        at twitter4j.internal.http.HttpClientWrapper.post(HttpClientWrapper.java
:98)
        at twitter4j.auth.OAuthAuthorization.getOAuthRequestToken(OAuthAuthoriza
tion.java:122)
        at twitter4j.auth.OAuthAuthorization.getOAuthRequestToken(OAuthAuthoriza
tion.java:104)
        at twitter4j.TwitterBaseImpl.getOAuthRequestToken(TwitterBaseImpl.java:2
98)
        at Account.getAccessTokenAfterAuthentication(Account.java:45)
        at Account.<init>(Account.java:33)
        at AddFormWin$1.actionPerformed(AddFormWin.java:75)
        at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
        at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Sour
ce)
        at java.awt.Component.processMouseEvent(Unknown Source)
        at javax.swing.JComponent.processMouseEvent(Unknown Source)
        at java.awt.Component.processEvent(Unknown Source)
        at java.awt.Container.processEvent(Unknown Source)
        at java.awt.Component.dispatchEventImpl(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Window.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$200(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)
        at java.awt.EventQueue$4.run(Unknown Source)
        at java.awt.EventQueue$4.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
由于使用者密钥/机密无效,身份验证失败。但为什么同样的应用程序在Windows7上运行得很好呢

请注意,在我的应用程序中,我使用Twitter4j(v-3.0.5)使用oob()身份验证


作为一名java开发人员,我对此感到相当惊讶,因为java以其平台独立性而闻名。那么java的平台独立性有什么问题吗?

这看起来不像java虚拟机或Windows操作系统的问题。我怀疑这与oob实现有关,或者输入了错误的PIN。我假设需要为每台机器输入PIN

请求pin的浏览器窗口未打开。我认为问题就像:“系统时钟是同步的。”可能是因为系统时钟不同步,这就是为什么它给我错误的原因。
Authentication credentials (https://dev.twitter.com/pages/auth) were missing
or incorrect. Ensure that you have set valid consumer key/secret, access token/
secret, and the system clock is in sync.
Failed to validate oauth signature and token