2013年9月17日星期二

Run the cmd error occurred java.lang.NoClassDefFoundError problem

under the eclipse created a java project : first, then create a new package : doudou; in a new category : hello.
running successfully in eclipse , I want to run under cmd , has been an error : java.lang.NoClassDefFoundError. . .
Then I create a java project also in : gfh, then no new packages , the default is the default package ; in a new class : hello, you can run the cmd ,
Is it because the package reason? Please expert guidance ah. . . . Online . . . . . . .
------ Solution ---------------------------------------- ----
first, you use Eclipse, why run the command line to run ?

If you build a package , the command line when running ,
1. the command line cd to the top level ( the upper layer of the package directory )
2. bring the package name , such as java doudou.hello
------ For reference only --------------- ------------------------

want to try it ! Getting Started
------ For reference only ------------------------------------ ---

very grateful , run a success !
------ For reference only -------------------------------------- -
me also this problem before, tried many methods will not just run with the package name finally succeeded , thanks !

没有评论:

发表评论