我正在Eclipse中从事Java项目。我可以启动应用程序(运行方式),我工作正常,但我无法启动调试为(我可以启动调试为但突然我不能再)。有没有人有这种奇怪的东西?
@dimitrisil 在调试控制台
MainWindow (1) [Java Application]
com.euroicc.histo.view.MainWindow at localhost:4325
Thread [AWT-Shutdown] (Running)
Daemon Thread [AWT-Windows] (Running)
Thread [AWT-EventQueue-0] (Suspended (exception NumberFormatException))
Integer.parseInt(String, int) line: not available
Integer.<init>(String) line: not available
InetAddressCachePolicy.<clinit>() line: not available
InetAddress$Cache.getPolicy() line: not available
InetAddress$Cache.put(String, Object) line: not available
InetAddress.cacheInitIfNeeded() line: not available
InetAddress.cacheAddress(String, Object, boolean) line: not available
InetAddress.getAddressFromNameService(String, InetAddress) line: not available
InetAddress.getLocalHost() line: not available
SeedGenerator$1.run() line: not available
AccessController.doPrivileged(PrivilegedAction<T>) line: not available [native method]
SeedGenerator.getSystemEntropy() line: not available
SecureRandom.engineNextBytes(byte[]) line: not available
SecureRandom.nextBytes(byte[]) line: not available
SecureRandom.next(int) line: not available
SecureRandom(Random).nextLong() line: not available
File.generateFile(String, String, File) line: not available
File.createTempFile(String, String, File) line: not available
FileCacheImageInputStream.<init>(InputStream, File) line: not available
InputStreamImageInputStreamSpi.createInputStreamInstance(Object, boolean, File) line: not available
ImageIO.createImageInputStream(Object) line: not available
ImageIO.read(URL) line: not available
BrushedMetalDecorationPainter.<init>() line: 69
BusinessBlackSteelSkin.<init>() line: 135
SubstanceBusinessBlackSteelLookAndFeel.<init>() line: 54
MainWindow$7.run() line: 238
InvocationEvent.dispatch() line: not available
EventQueue.dispatchEvent(AWTEvent) line: not available
EventDispatchThread.pumpOneEventForFilters(int) line: not available
EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: not available
EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: not available
EventDispatchThread.pumpEvents(int, Conditional) line: not available
EventDispatchThread.pumpEvents(Conditional) line: not available
EventDispatchThread.run() line: not available
Thread [DestroyJavaVM] (Running)
C:\Program Files\Java\jre1.6.0_17\bin\javaw.exe (17.12.2010. 15.00.45)
MainWindow (1) [Java Application]
com.euroicc.histo.view.MainWindow at localhost:4363
Thread [AWT-Shutdown] (Running)
Daemon Thread [AWT-Windows] (Running)
Thread [AWT-EventQueue-0] (Suspended (exception NumberFormatException))
Integer.parseInt(String, int) line: not available
Integer.<init>(String) line: not available
InetAddressCachePolicy.<clinit>() line: not available
InetAddress$Cache.getPolicy() line: not available
InetAddress$Cache.put(String, Object) line: not available
InetAddress.cacheInitIfNeeded() line: not available
InetAddress.cacheAddress(String, Object, boolean) line: not available
InetAddress.getAddressFromNameService(String, InetAddress) line: not available
InetAddress.getLocalHost() line: not available
SeedGenerator$1.run() line: not available
AccessController.doPrivileged(PrivilegedAction<T>) line: not available [native method]
SeedGenerator.getSystemEntropy() line: not available
SecureRandom.engineNextBytes(byte[]) line: not available
SecureRandom.nextBytes(byte[]) line: not available
SecureRandom.next(int) line: not available
SecureRandom(Random).nextLong() line: not available
File.generateFile(String, String, File) line: not available
File.createTempFile(String, String, File) line: not available
FileCacheImageInputStream.<init>(InputStream, File) line: not available
InputStreamImageInputStreamSpi.createInputStreamInstance(Object, boolean, File) line: not available
ImageIO.createImageInputStream(Object) line: not available
ImageIO.read(URL) line: not available
BrushedMetalDecorationPainter.<init>() line: 69
BusinessBlackSteelSkin.<init>() line: 135
SubstanceBusinessBlackSteelLookAndFeel.<init>() line: 54
MainWindow$7.run() line: 238
InvocationEvent.dispatch() line: not available
EventQueue.dispatchEvent(AWTEvent) line: not available
EventDispatchThread.pumpOneEventForFilters(int) line: not available
EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: not available
EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: not available
EventDispatchThread.pumpEvents(int, Conditional) line: not available
EventDispatchThread.pumpEvents(Conditional) line: not available
EventDispatchThread.run() line: not available
Thread [DestroyJavaVM] (Running)
C:\Program Files\Java\jre1.6.0_17\bin\javaw.exe (17.12.2010. 15.01.06)
MainWindow (1) [Java Application]
com.euroicc.histo.view.MainWindow at localhost:4369
Thread [AWT-Shutdown] (Running)
Daemon Thread [AWT-Windows] (Running)
Thread [AWT-EventQueue-0] (Suspended (exception NumberFormatException))
Integer.parseInt(String, int) line: not available
Integer.<init>(String) line: not available
InetAddressCachePolicy.<clinit>() line: not available
InetAddress$Cache.getPolicy() line: not available
InetAddress$Cache.put(String, Object) line: not available
InetAddress.cacheInitIfNeeded() line: not available
InetAddress.cacheAddress(String, Object, boolean) line: not available
InetAddress.getAddressFromNameService(String, InetAddress) line: not available
InetAddress.getLocalHost() line: not available
SeedGenerator$1.run() line: not available
AccessController.doPrivileged(PrivilegedAction<T>) line: not available [native method]
SeedGenerator.getSystemEntropy() line: not available
SecureRandom.engineNextBytes(byte[]) line: not available
SecureRandom.nextBytes(byte[]) line: not available
SecureRandom.next(int) line: not available
SecureRandom(Random).nextLong() line: not available
File.generateFile(String, String, File) line: not available
File.createTempFile(String, String, File) line: not available
FileCacheImageInputStream.<init>(InputStream, File) line: not available
InputStreamImageInputStreamSpi.createInputStreamInstance(Object, boolean, File) line: not available
ImageIO.createImageInputStream(Object) line: not available
ImageIO.read(URL) line: not available
BrushedMetalDecorationPainter.<init>() line: 69
BusinessBlackSteelSkin.<init>() line: 135
SubstanceBusinessBlackSteelLookAndFeel.<init>() line: 54
MainWindow$7.run() line: 238
InvocationEvent.dispatch() line: not available
EventQueue.dispatchEvent(AWTEvent) line: not available
EventDispatchThread.pumpOneEventForFilters(int) line: not available
EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: not available
EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: not available
EventDispatchThread.pumpEvents(int, Conditional) line: not available
EventDispatchThread.pumpEvents(Conditional) line: not available
EventDispatchThread.run() line: not available
Thread [DestroyJavaVM] (Running)
C:\Program Files\Java\jre1.6.0_17\bin\javaw.exe (17.12.2010. 15.01.30)
MainWindow (1) [Java Application]
com.euroicc.histo.view.MainWindow at localhost:4383
Thread [AWT-Shutdown] (Running)
Daemon Thread [AWT-Windows] (Running)
Thread [AWT-EventQueue-0] (Suspended (exception NumberFormatException))
Integer.parseInt(String, int) line: not available
Integer.<init>(String) line: not available
InetAddressCachePolicy.<clinit>() line: not available
InetAddress$Cache.getPolicy() line: not available
InetAddress$Cache.put(String, Object) line: not available
InetAddress.cacheInitIfNeeded() line: not available
InetAddress.cacheAddress(String, Object, boolean) line: not available
InetAddress.getAddressFromNameService(String, InetAddress) line: not available
InetAddress.getLocalHost() line: not available
SeedGenerator$1.run() line: not available
AccessController.doPrivileged(PrivilegedAction<T>) line: not available [native method]
SeedGenerator.getSystemEntropy() line: not available
SecureRandom.engineNextBytes(byte[]) line: not available
SecureRandom.nextBytes(byte[]) line: not available
SecureRandom.next(int) line: not available
SecureRandom(Random).nextLong() line: not available
File.generateFile(String, String, File) line: not available
File.createTempFile(String, String, File) line: not available
FileCacheImageInputStream.<init>(InputStream, File) line: not available
InputStreamImageInputStreamSpi.createInputStreamInstance(Object, boolean, File) line: not available
ImageIO.createImageInputStream(Object) line: not available
ImageIO.read(URL) line: not available
BrushedMetalDecorationPainter.<init>() line: 69
BusinessBlackSteelSkin.<init>() line: 135
SubstanceBusinessBlackSteelLookAndFeel.<init>() line: 54
MainWindow$7.run() line: 238
InvocationEvent.dispatch() line: not available
EventQueue.dispatchEvent(AWTEvent) line: not available
EventDispatchThread.pumpOneEventForFilters(int) line: not available
EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: not available
EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: not available
EventDispatchThread.pumpEvents(int, Conditional) line: not available
EventDispatchThread.pumpEvents(Conditional) line: not available
EventDispatchThread.run() line: not available
Thread [DestroyJavaVM] (Running)
C:\Program Files\Java\jre1.6.0_17\bin\javaw.exe (17.12.2010. 15.05.23)
MainWindow (1) [Java Application]
com.euroicc.histo.view.MainWindow at localhost:2740
Thread [AWT-Shutdown] (Running)
Daemon Thread [AWT-Windows] (Running)
Thread [AWT-EventQueue-0] (Suspended (exception NumberFormatException))
Integer.parseInt(String, int) line: not available
Integer.<init>(String) line: not available
InetAddressCachePolicy.<clinit>() line: not available
InetAddress$Cache.getPolicy() line: not available
InetAddress$Cache.put(String, Object) line: not available
InetAddress.cacheInitIfNeeded() line: not available
InetAddress.cacheAddress(String, Object, boolean) line: not available
InetAddress.getAddressFromNameService(String, InetAddress) line: not available
InetAddress.getLocalHost() line: not available
SeedGenerator$1.run() line: not available
AccessController.doPrivileged(PrivilegedAction<T>) line: not available [native method]
SeedGenerator.getSystemEntropy() line: not available
SecureRandom.engineNextBytes(byte[]) line: not available
SecureRandom.nextBytes(byte[]) line: not available
SecureRandom.next(int) line: not available
SecureRandom(Random).nextLong() line: not available
File.generateFile(String, String, File) line: not available
File.createTempFile(String, String, File) line: not available
FileCacheImageInputStream.<init>(InputStream, File) line: not available
InputStreamImageInputStreamSpi.createInputStreamInstance(Object, boolean, File) line: not available
ImageIO.createImageInputStream(Object) line: not available
ImageIO.read(URL) line: not available
BrushedMetalDecorationPainter.<init>() line: 69
BusinessBlackSteelSkin.<init>() line: 135
SubstanceBusinessBlackSteelLookAndFeel.<init>() line: 54
MainWindow$7.run() line: 238
InvocationEvent.dispatch() line: not available
EventQueue.dispatchEvent(AWTEvent) line: not available
EventDispatchThread.pumpOneEventForFilters(int) line: not available
EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: not available
EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: not available
EventDispatchThread.pumpEvents(int, Conditional) line: not available
EventDispatchThread.pumpEvents(Conditional) line: not available
EventDispatchThread.run() line: not available
Thread [DestroyJavaVM] (Running)
C:\Program Files\Java\jre1.6.0_17\bin\javaw.exe (17.12.2010. 16.17.11)
MainWindow (1) [Java Application]
com.euroicc.histo.view.MainWindow at localhost:2926
Thread [AWT-Shutdown] (Running)
Daemon Thread [AWT-Windows] (Running)
Thread [DestroyJavaVM] (Running)
Thread [AWT-EventQueue-0] (Suspended (exception NumberFormatException))
Integer.parseInt(String, int) line: not available
Integer.<init>(String) line: not available
InetAddressCachePolicy.<clinit>() line: not available
InetAddress$Cache.getPolicy() line: not available
InetAddress$Cache.put(String, Object) line: not available
InetAddress.cacheInitIfNeeded() line: not available
InetAddress.cacheAddress(String, Object, boolean) line: not available
InetAddress.getAddressFromNameService(String, InetAddress) line: not available
InetAddress.getLocalHost() line: not available
SeedGenerator$1.run() line: not available
AccessController.doPrivileged(PrivilegedAction<T>) line: not available [native method]
SeedGenerator.getSystemEntropy() line: not available
SecureRandom.engineNextBytes(byte[]) line: not available
SecureRandom.nextBytes(byte[]) line: not available
SecureRandom.next(int) line: not available
SecureRandom(Random).nextLong() line: not available
File.generateFile(String, String, File) line: not available
File.createTempFile(String, String, File) line: not available
FileCacheImageInputStream.<init>(InputStream, File) line: not available
InputStreamImageInputStreamSpi.createInputStreamInstance(Object, boolean, File) line: not available
ImageIO.createImageInputStream(Object) line: not available
ImageIO.read(URL) line: not available
BrushedMetalDecorationPainter.<init>() line: 69
BusinessBlackSteelSkin.<init>() line: 135
SubstanceBusinessBlackSteelLookAndFeel.<init>() line: 54
MainWindow$7.run() line: 238
InvocationEvent.dispatch() line: not available
EventQueue.dispatchEvent(AWTEvent) line: not available
EventDispatchThread.pumpOneEventForFilters(int) line: not available
EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: not available
EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: not available
EventDispatchThread.pumpEvents(int, Conditional) line: not available
EventDispatchThread.pumpEvents(Conditional) line: not available
EventDispatchThread.run() line: not available
C:\Program Files\Java\jre1.6.0_17\bin\javaw.exe (17.12.2010. 16.37.37)
答案 0 :(得分:0)
我已经看到这两个菜单分别对他们的目标感到困惑。例如,对于Ant构建文件,将继续标题为“Run As&gt; Ant Build”,另一个将标题为其他内容,并失败。
重启Eclipse始终解决了这个问题。
答案 1 :(得分:0)
基于(格式不正确的)答案确实应该是问题的一部分,看起来你的套接字地址可能不正确。
对于INetAddress.getLocalhost ...反复重复NumberFormatException ...
啊!你有IPv4或IPv6吗?如果v4(十进制)解释器试图解析v6(十六进制)地址,事情可能会被破坏。
也可能是你的调试套接字号不是一个数字(至少不是十进制数)...但是我没有看到UI中的任何地方来调整这个,所以我看不出你怎么做打破了它。
答案 2 :(得分:0)
仅仅是因为将来有人会遇到同样的问题。最近我被相同的用例(但在NetBeans中)所欺骗 - 问题是由java.lang.IllegalArgumentException上的断点造成的,我前段时间创建并忘记了它,所以IDE一直停在某处Java核心代码只是因为该断点,但我认为它是由我的代码或运行时环境中的某些东西引起的:(
实际上,我会说这个问题在核心Java库中是一般的编码风格。在if()条件更合适并且在调试异常时导致主要问题的情况下,有很多地方会抛出异常 - 它们中有太多。在那个特例的情况下,它是由以下几行引起的(我从这里http://download.java.net/openjdk/jdk6/获取了InetAddressCachePolicy的来源):
try {
tmp = new Integer(
java.security.AccessController.doPrivileged (
new PrivilegedAction<String>() {
public String run() {
return Security.getProperty(cachePolicyProp);
}
}));
} catch (NumberFormatException e) {
// ignore
}
你可能会注意到编写代码的人知道配置中提供的潜在'not-a-number'字符串,但是没有尝试更优雅地处理,至少String的情况是null或为空,这实际上是这个问题的案例。
此处有关于Integer.parseInt()的相关讨论 - Java: Good way to encapsulate Integer.parseInt()