From leavens@cs.iastate.edu Wed Oct 29 01:00:24 2003 Date: Wed, 29 Oct 2003 00:59:53 -0600 (CST) From: Gary T. Leavens To: Brian Dorn Cc: Gary Leavens Subject: Re: Eclipse & Junit Hi Brian, On Wed, 29 Oct 2003, Brian Dorn wrote: > Is there anything special I need to do to get JUnit working inside of > Eclipse? I can't seem to get the correct plugins installed and thus am > having problems working on the assignment in eclipse. While it's not a > crucial thing to use Eclispe, it's definatly much nicer than a standard text > editor. You have to add the JUnit jar file to the Java build path in JUnit to make that work. See http://www.cs.iastate.edu/~leavens/ComS541/running_java.shtml#Eclipse for details. > P.S. Hope the fires are staying away from all the OOP. Yes, we're in a concrete jungle here. But there is smoke... -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 --------------------------------------- From leavens@larch.cs.iastate.edu Wed Oct 29 21:19:08 2003 Date: Wed, 29 Oct 2003 21:18:38 -0600 (CST) From: Gary T. Leavens To: wfengm@cs.iastate.edu Subject: Re: CLASSPATH Hi Fengming, On Wed, 29 Oct 2003 wfengm@cs.iastate.edu wrote: > I am puzzled by the words in problem 1 of the homework > > How can I set up the environment for the test? I am using windows machine and I > tried to set an environment variable for this, but failed. If you use Eclipse you don't have to set up the CLASSPATH explicitly, but instead will use the "Java build path". If you are using the dos command line, do set CLASSPATH=... to set it. Or it can be done from the control panel. (It wouldn't hurt to learn how to use Linux either..) -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 --------------------------------------- From leavens@larch.cs.iastate.edu Fri Oct 31 08:58:06 2003 Date: Fri, 31 Oct 2003 08:57:42 -0600 (CST) From: Gary T. Leavens To: wfengm@cs.iastate.edu Subject: Re: AspectJ building in Eclipse Hi Fengming, On Fri, 31 Oct 2003 wfengm@cs.iastate.edu wrote: > I have followed the instructions. > But when I run it, I got as follows: > java.lang.NoClassDefFoundError: FibonacciTest > Exception in thread "main" > > I just got puzzled because when I run all of the things as a java project, it is > OK. But when I run it as an aspectj project, I will get the above message. It probably is that case in Eclipse that you haven't properly built the project as an aspectj project. AspectJ projects don't get built implicitly as do Java projects, you have to build it by pressing the build button or selecting "rebuild-all". This build button seems to be missing at first. Here are the instructions for making it happen from AJDT help in Eclipse. The build button only appears in the Java perspective. If the AspectJ build button doesn't appear in the Java Perspective, first switch to that perspective and then go to Window -> Customize Perspective. Expand "Other" and select "AspectJ Actions" then click "Apply." Press the build button (it will be to the right of the printer icon in the tool bar) before testing. That should fix it. If you have a fast machine, you can also try turning on incremental compilation. To find it folow the directions under "Turning on incremental compilation" that you can find by searching in Eclipse's help using the search string "build button aspectj". -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ------------------------------------------------------------------------------