jeudi 5 novembre 2015

NoClassDefFoundError in java tester

class dHeap<T extends Comparable<? super T>> implements dHeapInterface<T>

public dHeap(int heapSize) {
    dVar = 2;
    size = heapSize;
    array = (T[]) new Comparable[heapSize];
    nelems = 0;

}

.

public class dHeapTester {

private dHeap<Integer> intHeap;
private dHeap<Integer> dHeap;
private dHeap<String> sHeap;


@Before
public void setUp() {

    intHeap = new dHeap<>(5);
    sHeap = new dHeap<>(5);
    dHeap = new dHeap<>(4, 5);

The top code is my class signature and constructor, and the bottom is my tester for it. I get a NoClassDefFoundError when running the tester and it happens during the initialization of things. Why am I getting this error? The third initialization dHeap is using a second constructor that chooses the amount of children each node has rather than binary

Aucun commentaire:

Enregistrer un commentaire