run program using java.exe
I have a program that runs inside of Jbuilder and also can be run as a jar file with the java -jar command. I need to be able to run this from the dos prompt so I can run it from within another software suite. I keep getting the NoClassDefFoundError exception in thread main.I have tried setting the classpth to the folder where my classes are and have tried running it from that directory as well.If I try to recompile it using javac it does not recognize some of the libraries used either --package com.borland.sql........
I received some answers on this topic before but they have not helped.
[608 byte] By [
smm71] at [2007-9-30 18:08:53]

java -cp .;<any other directories or jars> YourClassName
You get a NoClassDefFoundError message because the JVM (Java Virtual Machine) can't find your class. The way to remedy this is to ensure that your class is included in the classpath. The example assumes that you are in the same directory as the class you're trying to run.
[url=http://wiki.java.net/bin/view/Javapedia/ClassPath]Javapedia: Classpath[/url]
[url=http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/classpath.html]Setting the class path[/url] (Windows)
[url=http://java.sun.com/j2se/1.4.2/docs/tooldocs/findingclasses.html]How Classes are Found[/url]