Physics not compiling, Test Chooser Issue

I just thought I'd try to get the physics going, so I followed the tutorials (using the ANT build file in NetBeans 5.5.1) and everything's looking good, until:


Compiling 32 source files to /home/user/JME/cvs/jmephysics/classes
/home/user/JME/cvs/jmephysics/test-interactive/com/jmetest/physics/TestChooser.java:40: package jmetest does not exist
public class TestChooser extends jmetest.TestChooser {
/home/user/JME/cvs/jmephysics/test-interactive/com/jmetest/physics/TestMarble.java:53: package jmetest does not exist
import jmetest.TestChooser;
/home/user/JME/cvs/jmephysics/test-interactive/com/jmetest/physics/TestChooser.java:47: cannot find symbol
symbol  : method start(java.lang.String[])
location: class com.jmetest.physics.TestChooser
        new TestChooser().start( args );
/home/user/JME/cvs/jmephysics/test-interactive/com/jmetest/physics/TestChooser.java:52: cannot find symbol
symbol  : method find(java.lang.String,boolean,java.util.Vector<java.lang.Class>)
location: class com.jmetest.physics.TestChooser
        find( "com.jmetest.physics", true, classes );
/home/user/JME/cvs/jmephysics/test-interactive/com/jmetest/physics/TestChooser.java:50: method does not override or implement a method from a supertype
    @Override



You can grab the latest CVS to see the Test Chooser source, but I'll put up my synced version, all the same:

/*
 * Copyright (c) 2005-2007 jME Physics 2
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 *
 *  * Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 *  * Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 *  * Neither the name of 'jME Physics 2' nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
package com.jmetest.physics;

import java.util.Vector;
import javax.swing.UIManager;

/**
 * @author Irrisor
 */
public class TestChooser extends jmetest.TestChooser {
    public static void main( String[] args ) {
        try {
            UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() );
        } catch ( Exception e ) {
            //ok, keep the ugly one then :
        }
        new TestChooser().start( args );
    }

    @Override
    protected void addDisplayedClasses( Vector<Class> classes ) {
        find( "com.jmetest.physics", true, classes );
    }
}

/*
 * $log$
 */



Help?

EDIT: I uncommented the section mentioned in the build file to skip the tests, and all builds fine. I'm trying to get one of the lessons to build now, we'll see how this goes. I'm still interested in the solution to the test builds.

The build file does not find the jmetest package of jme. You need to compile the tests in jme first.

I have done so, still no luck. I'm even running the jME Test Chooser and running examples through it. :expressionless:



I'm pretty sure it's a classpath broken somewhere, but I'm still learning NetBeans IDE…

ah, Netbeans (thought it was the ant build file)



Did you use some setup guide - from the wiki perhaps?



@all: Any netbeans experts who could tell if you need to specify extra dependencies for test sources?

So you are using a pre-made ant script from either the tutorial you mention or the jmephysics project?

If that's the case this isn't a netbeans issue, as all libraries are set up in the ant script then. Netbeans just runs the script to build that kind of project, all configuration is done in the ant file.

Yes, I’m using the build.xml that comes from the CVS, no mod.



I followed this post’s instructions for setting up JME Physics, as it was much closer to the JME setup here. (I have tried the Physics setup as mentioned in the Wiki, but hit many more brickwalls that way.)



I understand that NetBeans is just utilizing the Ant build file, but if NetBeans is a new technology for me, Ant files are even more so. :stuck_out_tongue:



Should I post my Build.xml? Like I said, it’s the current CVS.



Thanks you guys. :slight_smile:

The build scripts expects jme classfiles - including the tests - in ${module.jme.basedir}/build which is …/jME/build by default. If your classfiles are somewhere else you can define it in a build.properties file with module.jme.basedir=YOUR_PATH_TO_JME - this works with ant outside netbeans.



I have no clue what could be wrong within netbeans.

Well… Don't ask me why/how, but it's working. I've tried both a Build.All and a Release.All, and both are fine, WITHOUT the tests being skipped.



Now to get one of the examples to run…