How to set class path in Eclipse?

AmandaChenCa 2008-04-20 07:22:21
How to run a file which include a main type in Eclipse?each I try to run the following code , Eclipse always says the Selection does not contain a main type?
*****************************************************************
import FSMApi.*;
import FSMIsEven.*;

public class Main_FSMIsEven
{

public Main_FSMIsEven()
{
}

public static void main(String[] args)
{
FSM fsm = new FSM( new FSMIsEven() );

try
{
fsm.Initialize();
fsm.Process( IDEvents.EVENT_input0 );
fsm.Process( IDEvents.EVENT_input1 );
fsm.Process( IDEvents.EVENT_input0 );
fsm.Process( IDEvents.EVENT_input1 );
fsm.Process( IDEvents.EVENT_input0 );
fsm.Process( IDEvents.EVENT_input1 );
if( fsm.IsFinal() )
{
System.out.println( "Final" );
}
else
{
System.out.println( "NonFinal" );
}
fsm.Finalize();
}
catch( FSMException e )
{
System.out.println( e );
}
}

public static void Func0()
{
System.out.println( "In Func0" );
}

public static void Func1()
{
System.out.println( "In Func1" );
}

public static void Func2()
{
System.out.println( "In Func2" );
}

public static void Func3()
{
System.out.println( "In Func3" );
}

}
...全文
113 回复 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

567

社区成员

发帖
与我相关
我的任务
社区描述
英特尔® 边缘计算,聚焦于边缘计算、AI、IoT等领域,为开发者提供丰富的开发资源、创新技术、解决方案与行业活动。
社区管理员
  • 英特尔技术社区
  • shere_lin
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧