I'm working on a project in java that's supposed to let the user type in a bunch of data. The data typed in is then going to be handled by the program so that it can be graphically shown to the user. Once the data is typed in I want there to be a "save" button, mainly because I want to give the user the opportunity to continue his/her work later. So after doing some reading on how to save data in a java program, I thought it'd be a good idea to use XStream and save the data as an XML-file.
So, my problem now is that I can't make my program find the XStream package. I have downloaded the XStream folder containing a bunch of .jar files and tried putting them in the same folder as my own .java files and in the main program writing: import com.thoughtworks.xstream.XStream;
This works fine when I compile, but when I run the program, this error shows up:
Exception in thread "main" java.lang.NoClassDefFoundError: org/xmlpull/v1/XmlPullParserException
So what I need help with is how I can get my program to import the classes from the jar files that I need. Where should I put the jar files? I'm a beginner to Java and I'm not writing my code in and IDE, I'm writing it in Smultron on my Mac.
Thanks in advance