读书人

cvs源码管理后程序报错解决方法

发布时间: 2012-01-19 00:22:28 作者: rapoo

cvs源码管理后程序报错
今天在自己机器上搞了个cvs服务器,然后对代码进行管理后,运行以下程序
public class Cvs_demo {
public Cvs_demo(){
System.out.print( "test cvs!! ");
}
public int add(int a,int b){
return(a+b);
}
public static void main(String arg[]){
Cvs_demo aa = new Cvs_demo();
System.out.print(aa.add(3, 5));
}
}
报错
could not find the main class.Program will exit!
但是同样程序不在cvs源码管理的地方,就可以运行成功,这是什么原因?请教ing!!

[解决办法]
问题我没有懂好多,我只是建议哈:注意在which prospect,which view 中调试运行,可能是这个原因,希望讲清楚点好吗?还有就是 在eclipse里的cvs client配置对CVS的看出什么问题没有!
[解决办法]
百度一下,你就知道。
[解决办法]
public class Cvs_demo {
public Cvs_demo(){
System.out.print( "test cvs!! ");
}
public int add(int a,int b){
return(a+b);
}
public static void main(String arg[]){
Cvs_demo aa = new Cvs_demo();
System.out.print(aa.add(3, 5));
}
}
---------------------------------------------------
改为
public static void main(String arg[])
{
Cvs_demo aa = new Cvs_demo();
System.out.print(aa.add(3, 5));
}
public class Cvs_demo
{
public Cvs_demo(){
System.out.print( "test cvs!! ");
}
public int add(int a,int b)
{
return(a+b);
}
}
-----------------------------------------------


读书人网 >Eclipse开发

热点推荐