error in TestCase()
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   pedro_sacosta
Posted On:   Sunday, November 6, 2005 01:24 PM

I program a java file that use junit. The file is surely correct, because i can run in eclipse, in windows. In linux, because i use emacs, i try to compile my file in the shell, and it gives me an error. ---------- 1. ERROR in com/sample/GestaoOcorrencias.java (at line 15) public class GestaoOcorrencias extends TestCase { ^^^^^^^^^^^^^^^^^ Implicit super constructor TestCase() is undefined for default constructor. Must define an explicit constructor ---------- What this error means, and what can i do to correct it? To compile the program i do this (the libs are right): javac -cp ../../lib/junit.jar:../../lib/jbpm-3.0.1.jar com/sample/*.java thanks, Pedro    More>>

I program a java file that use junit. The file is surely correct, because i can run in eclipse, in windows.

In linux, because i use emacs, i try to compile my file in the shell, and it gives me an error.

---------- 1. ERROR in com/sample/GestaoOcorrencias.java (at line 15) public class GestaoOcorrencias extends TestCase { ^^^^^^^^^^^^^^^^^ Implicit super constructor TestCase() is undefined for default constructor. Must define an explicit constructor ----------

What this error means, and what can i do to correct it?

To compile the program i do this (the libs are right):

javac -cp ../../lib/junit.jar:../../lib/jbpm-3.0.1.jar com/sample/*.java

thanks,

Pedro

   <<Less

Re: error in TestCase()

Posted By:   Anonymous  
Posted On:   Wednesday, January 11, 2006 05:14 AM

Make sure you have only the latest junit.jar in your classpath (3.8.1). This error can arise if you have multiple junit.jars, and the compiler happens to pick the older one first. Old versions of JUnit had only package visibility for this constructor.

Re: error in TestCase()

Posted By:   Christopher_Koenigsberg  
Posted On:   Sunday, November 6, 2005 05:59 PM

i think you do need an explicit zero-arg constructor?
About | Sitemap | Contact