Java Linux特定错误IOException

Java Linux特定错误IOException,java,linux,spotify,Java,Linux,Spotify,因此,我正在制作一个java应用程序,它可以从特定的Spotify用户那里获取所有公共播放列表。这一切都很好,一直工作到我在基于linux的机器(raspbian java 1.8版)上托盘并运行我的项目为止。当我在windows上运行它时,我得到了预期的输出,但在linux上运行时,我得到了预期的输出 来自linux的错误日志 java.io.IOException at com.wrapper.spotify.SpotifyHttpManager.execute(SpotifyHttpMan

因此,我正在制作一个java应用程序,它可以从特定的Spotify用户那里获取所有公共播放列表。这一切都很好,一直工作到我在基于linux的机器(raspbian java 1.8版)上托盘并运行我的项目为止。当我在windows上运行它时,我得到了预期的输出,但在linux上运行时,我得到了预期的输出

来自linux的错误日志

java.io.IOException
at com.wrapper.spotify.SpotifyHttpManager.execute(SpotifyHttpManager.java:164)
at com.wrapper.spotify.SpotifyHttpManager.post(SpotifyHttpManager.java:81)
at com.wrapper.spotify.methods.AbstractRequest.postJson(AbstractRequest.java:38)
at com.wrapper.spotify.methods.authentication.ClientCredentialsGrantRequest.getAsync(ClientCredentialsGrantRequest.java:30)
at com.simon.spotify.Spotify.GetPublicPlayLists(Spotify.java:47)
at com.simon.Main$10.start(Main.java:375)
at com.simon.Main.getSpotifyPlayLists(Main.java:379)
at com.simon.keyevent.selectionHandler(keyevent.java:77)
at com.simon.keyevent.keyPressed(keyevent.java:52)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:250)
at java.awt.Component.processKeyEvent(Component.java:6493)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2832)
at java.awt.Component.processEvent(Component.java:6312)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4891)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4713)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1954)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:806)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1074)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:945)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:771)
at java.awt.Component.dispatchEventImpl(Component.java:4762)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Window.dispatchEventImpl(Window.java:2750)
at java.awt.Component.dispatchEvent(Component.java:4713)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
这是包含getSpotifyPlayLists的类

公共类Spotify{
公共静态字符串clientId=”“;//插入客户端公钥
公共静态字符串clientSecret=“;//插入客户端sercet密钥
公共静态字符串userid=”“;//插入用户名
public Spotify(字符串clientId、字符串clientSecret、字符串userid){
this.clientId=clientId;
this.clientSecret=clientSecret;
this.userid=userid;
}
公共静态Api;
public static void GetPublicPlayLists(){
System.out.println
(新异常().getStackTrace()[0].getMethodName());
ArrayList数据=新的ArrayList();
api=api.builder()
.clientId(clientId)
.clientSecret(clientSecret)
.build();
/*创建一个请求对象*/
最终ClientCredentialsGrantRequest请求=api.clientCredentialsGrant().build();
/*使用请求对象以异步(getAsync)或同步(get)方式发出请求*/
final SettableFuture responseFuture=request.getAsync();
/*添加回调以处理成功和失败*/
Futures.addCallback(responseFuture,newfuturecallback(){
@凌驾
成功时公共无效(客户端凭据客户端凭据){
/*已成功检索令牌*/
System.out.println(“成功检索访问令牌!”+clientCredentials.getAccessToken());
System.out.println(“访问令牌在“+clientCredentials.getExpiresIn()+”秒”内过期”);
/*在Api对象上设置访问令牌,以便继续使用*/
setAccessToken(clientCredentials.getAccessToken());
/*请注意,此流不会返回刷新令牌。
*这仅适用于授权代码流*/
最终用户播放列表请求=api.getplaysforuser(userid.build();
试一试{
最终页面playlispage=request.get();
对于(SimplePlaylist播放列表:playlisPage.getItems()){
System.out.println(playlist.getName()+”:“+playlist.getId()+”:“+playlist.getUri()+”:曲目计数=“+playlist.getTracks().getTotal());
/*项目i=新项目();
i、 title=playlist.getName();
i、 creator=playlist.getOwner().getId();
i、 uri=playlist.getId();
数据.添加(i);
*/
}
}捕获(例外e){
System.out.println(“出错了!”+e.getMessage());
}
}
@凌驾
失败时的公共无效(可丢弃){
/*获取访问令牌时出错。这可能是由于客户端id或
*客户端密码无效*/
System.out.println(“出错了!2”);
printStackTrace();
可丢弃的printStackTrace(系统输出);
}
});
返回;
}

}
所以我没能弄清楚问题出在哪里,但后来我重新安装了操作系统,它又开始工作了