eclipse 3.3.1 + jdk 1.7.0
ant_home 已经设置
public class helloworld {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println("hello,world!");
}
}
1, javac helloworld.java 可以编译通过 ;java helloworld 可以输出
2, 但是在eclipse中,右键点击helloworld.java-->run as --> java application
确提示; a java exeception has occurred ;
error:could not find the main class ;
error:a jni error has occured ,please check your installation and try again .
------解决方案--------------------
在我的eclips运行中通过,估计lz程序安装有问题。
------解决方案--------------------
应该是JDK安装有问题哇
或者是ECLIPCE有问题
一般的咋个会报ERROR
------解决方案--------------------
你的eclipse配制的时候,选的jdk是否正确?
------解决方案--------------------
请问上一楼的朋友,为什么呢?