我尝试java --version在命令行中得到:
Unrecognized option: --version
Error: Could not create the Java virtual machine
Error: A fatal exception has occurred. Program will exit.
Run Code Online (Sandbox Code Playgroud)
一切都工作正常,直到我安装了jre 7(我预装了jdk 1.6)所以,我卸载了以前的版本,重新启动然后安装了新的jdk 7u5 windows i586.
我仍然遇到同样的问题.谁能帮我这个?
由于这个原因,我无法安装和运行maven.
public class Portfolio extends Thread {
private volatile Thread stopMe= Thread.currentThread();
public Portfolio(String name) {
super(name);
// TODO Auto-generated constructor stub
}
public void stopMe(){
stopMe= null;
}
@Override
public void run() {
while(stopMe== Thread.currentThread()){
try {
for(int i=0; i<10; i++){
//sleep(700);
System.out.println("You have " +(500+i)+ " shares of IBM");
}
} catch (Exception e) {
// TODO Auto-generated catch block
System.out.println(Thread.currentThread().getName()+e.toString());
}}
}
}
Run Code Online (Sandbox Code Playgroud)
public class TestThreads {
/**
* @param args
*/
public static void main(String[] …Run Code Online (Sandbox Code Playgroud)