1

Topic: JavaTutorial

When I compile the code there are no complaints, but when I try to run it I get:
Exception in thread "Main" java.lang.NoClassDefFoundError: com/gurock/smartinspect/SIAuto

Code:
import com.gurock.smartinspect.*;

public class JavaTutorial

{
    public static void doSomething()
{
    SiAuto.main.logMessage("1st Smartinspect message!");
}

    public static void main(String[] args)
    {
    SiAuto.si.setEnabled(true);
    doSomething();
    }
}



I have added Smartinspect.jar to the /ext directory

Any help appreciated
Jim

2

Re: JavaTutorial

OK, I did not read the instructions properly - just followed the guide and ran the program in the IDE and did receive the message in the Console!

Sorry for the premature post!

Jim

3

Re: JavaTutorial

Hello Jim,

Working with Java's CLASSPATH and getting it right can be difficult, so we recommend using SmartInspect with IDEs such as Eclipse that do a good job of hiding this complexity. Good to know that it's working now. Just let us know if there's anything else.

Thanks,
Tobias