Hi
Im quite annoyed at having to ask this but I cant get it to work. Currently I have a project with:
5 Classes in the src/ folder
2 JARS named profiles.jar and classifier.jar in the root folder
I want to create a "makefile?" or "batch file?" to compile and run these classes FROM THE WINDOWS COMMAND LINE, but first add the jars to the buildpath? Im not sure how I go about this
When I try to do it, it says that the class is not found, most likely due to me not adding the jars to the buildpath correctly. What are the commands I need to use to run this in command prompt?
Thanks Philip
EDIT
Thanks for the help, Im having alot of trouble getting it to work tho Currently I have a project with 5 classes in the src folder, and 2 jars in the jar folder
Here are the commands Im running:
set CLASSPATH=C:\wamp\www\news\UserProfiling\jars\classifier.jar ;C:\wamp\www\news\UserProfiling\jars\profiles.jar
Then from the root folder, Im running:
javac src/*.java
Then:
java -cp ./src:./jars/* src/Interaction
Interaction is the main class, Im getting all sorts of noclassfound errors, am I doing something wrong? Many thanks Philip
THE ERROR
java -cp ./src:./jars/* Interaction Exception in thread "main" java.lang.NoClassDefFoundError: Interaction Caused by: java.lang.ClassNotFoundException: Interaction at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) Could not find the main class: Interaction. Program will exit.