首页上一页 1 下一页尾页 4 条记录 1/1页
实战突击:Java项目开发案例整合 第二章FTP客户端
发表在Java图书答疑
2014-10-17
是否精华
是
否
版块置顶:
是
否
设置时间:
非永久
永久
起始时间:
结束时间:
是否扣分:
是
否
导入工程后有错误,如附件所示。
精彩评论 4
2014-10-20
板凳
[FIELDSET][LEGEND]引自:1楼[/LEGEND]
请问您现在使用的JDK是什么版本?还有您可以在Eclipse的标记面板中查看具体的错误原因。如果是JDK版本问题,您可以在项目名称节点上,单击鼠标右键,在弹出的快捷菜单中选择“属性”菜单项,然后在打开的属性对话框中,选择Java编译器,然后在“编译器一致性级别”右侧的下拉列表中选择您机器中安装的JDK的版本,如果该项内容不可选,那么把上面的那个复选框取消勾选状态。最后应用应该就可以了。
[/FIELDSET]
回复:
我的jdk是1.7。按你上面说的,不行,还是和原来一样。要不我把项目发给你吧,可以吗?
请问您现在使用的JDK是什么版本?还有您可以在Eclipse的标记面板中查看具体的错误原因。如果是JDK版本问题,您可以在项目名称节点上,单击鼠标右键,在弹出的快捷菜单中选择“属性”菜单项,然后在打开的属性对话框中,选择Java编译器,然后在“编译器一致性级别”右侧的下拉列表中选择您机器中安装的JDK的版本,如果该项内容不可选,那么把上面的那个复选框取消勾选状态。最后应用应该就可以了。
[/FIELDSET]
回复:
我的jdk是1.7。按你上面说的,不行,还是和原来一样。要不我把项目发给你吧,可以吗?
2014-12-19
4L
[FIELDSET][LEGEND]引自:3楼[/LEGEND]
这个程序是在JDK1.6下开发的,在JDK 1.7中FtpClient类的使用方法与1.6不同了,所以导入项目后会出现错误,您可以在JDK 1.6下测试这个项目。
[/FIELDSET]
回复:
经过装回jdk1.6,可以运行,但一段时间后我又运行,控制台就会出现
java.lang.NumberFormatException: For input string: "r group"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Long.parseLong(Unknown Source)
at java.lang.Long.parseLong(Unknown Source)
at com.lzw.ftp.extClass.FtpFile.setSize(FtpFile.java:59)
at com.lzw.ftp.panel.ftp.FtpPanel$2.run(FtpPanel.java:221)
at com.lzw.ftp.panel.ftp.FtpPanel.listFtpFiles(FtpPanel.java:236)
at com.lzw.ftp.panel.ftp.FtpPanel.refreshCurrentFolder(FtpPanel.java:270)
at com.lzw.ftp.FTP_Client_Frame.linkButtonActionPerformed(FTP_Client_Frame.java:534)
at com.lzw.ftp.FTP_Client_Frame.access$4(FTP_Client_Frame.java:494)
at com.lzw.ftp.FTP_Client_Frame$10.actionPerformed(FTP_Client_Frame.java:290)
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 Source)
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$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
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)
thread is UnAlive!
不知怎么回事,我重装系统,又试了一遍,还是只要运行就会出现上述的情况。
这个程序是在JDK1.6下开发的,在JDK 1.7中FtpClient类的使用方法与1.6不同了,所以导入项目后会出现错误,您可以在JDK 1.6下测试这个项目。
[/FIELDSET]
回复:
经过装回jdk1.6,可以运行,但一段时间后我又运行,控制台就会出现
java.lang.NumberFormatException: For input string: "r group"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Long.parseLong(Unknown Source)
at java.lang.Long.parseLong(Unknown Source)
at com.lzw.ftp.extClass.FtpFile.setSize(FtpFile.java:59)
at com.lzw.ftp.panel.ftp.FtpPanel$2.run(FtpPanel.java:221)
at com.lzw.ftp.panel.ftp.FtpPanel.listFtpFiles(FtpPanel.java:236)
at com.lzw.ftp.panel.ftp.FtpPanel.refreshCurrentFolder(FtpPanel.java:270)
at com.lzw.ftp.FTP_Client_Frame.linkButtonActionPerformed(FTP_Client_Frame.java:534)
at com.lzw.ftp.FTP_Client_Frame.access$4(FTP_Client_Frame.java:494)
at com.lzw.ftp.FTP_Client_Frame$10.actionPerformed(FTP_Client_Frame.java:290)
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 Source)
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$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
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)
thread is UnAlive!
不知怎么回事,我重装系统,又试了一遍,还是只要运行就会出现上述的情况。