2
当我使用maven时,遇到了一个被解雇的问题。我使用“maven exec:java”执行下面的代码。 显然,它应该抛出一个RuntimeException,但是我在控制台中没有看到任何东西。但是如果我在eclipse中执行它,我可以看到错误信息。那么异常去了哪里?由于异常信息在哪里?
public class HelloWorld {
public static class MyThread extends Thread {
@Override
public void run() {
String str = null;
str = str.trim();
}
}
public static void main(String[] args) throws InterruptedException, IOException {
MyThread thread = new MyThread();
thread.start();
System.in.read();
}
}
也许它会进入日志文件? – casablanca 2010-10-21 01:29:58