When I try and run my java after doing Javac Main.java Course.java Rooms.java CSVReader.java CSVParser.java

I executed three different tried.. java Main, java main, and java classsched.Main

Java Code:

rob@rob-laptop:~/Desktop/attachments_2010_06_07/ClassSched/src/classsched$ java Main
Exception in thread "main" java.lang.NoClassDefFoundError: Main (wrong name: classsched/Main)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: Main. Program will exit.
rob@rob-laptop:~/Desktop/attachments_2010_06_07/ClassSched/src/classsched$ java main
Exception in thread "main" java.lang.NoClassDefFoundError: main
Caused by: java.lang.ClassNotFoundException: main
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: main. Program will exit.
rob@rob-laptop:~/Desktop/attachments_2010_06_07/ClassSched/src/classsched$ java classsched.Main
Exception in thread "main" java.lang.NoClassDefFoundError: classsched/Main
Caused by: java.lang.ClassNotFoundException: classsched.Main
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: classsched.Main. Program will exit.
rob@rob-laptop:~/Desktop/attachments_2010_06_07/ClassSched/src/classsched$

It appears that your Main class is in the package: classsched
Are the other classes also in packages?
Does the classpath point to the folder containing the classsched folder?
Are all the classes in that package in the classsched folder?

To execute the program go to the folder containing the classsched folder that contains all the class files and enter:
java classsched.Main

I just spoke to my professor, and I explained to him that makefile for Java is outdated, and what is currently being used is Ant.. he states that as long as it can run and execute in a linux environment I will be fine.. are there any applications that can automate the process?

Or maybe a better start is.. how to execute my files correctly.. I have already compiled it with no errors.. and have the files I need in a .class file.. executing it with the commands java main, java Main, or java classsched.Main (classsched is the package name) gives me errors

Exception in thread "main" java.lang.NoClassDefFoundError: classsched/Main
Caused by: java.lang.ClassNotFoundException: classsched.Main
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: classsched.Main. Program will exit.
rob@rob-laptop:~/Desktop/attachments_2010_06_07/ClassSched/src/classsched$
rob@rob-laptop:~/Desktop/attachments_2010_06_07/ClassSched/src/classsched$

Yes, the other classes are in packages, package classsched
Yes, the classpath is JFLAGS = -g -sourcepath /Desktop/attachments_2010_06_07/ClassSched/src/classsched

Using a package, you need to backup the folders used in package path to be in a folder where java can find the class files.

I am a bit confused by how to do this..

If I am in a terminal where the path is suppose to be suppose
.../src/classsched/ is where all of my .class and .java is.. and i am also executing my java from here.. do I need to create a copy of classsched and place that copy inside the ..../src/classsched/ directory?

You left off the command line. Need to see the location and the command that was issued.
Is Main in a package?
Is the Main.class file in: /Desktop/attachments_2010_06_07/ClassSched/src/classsched
If so go to: /Desktop/attachments_2010_06_07/ClassSched/src/
and issue: java classsched.Main

You left off the command line. Need to see the location and the command that was issued.
Is Main in a package?
Is the Main.class file in: /Desktop/attachments_2010_06_07/ClassSched/src/classsched
If so go to: /Desktop/attachments_2010_06_07/ClassSched/src/
and issue: java classsched.Main

wow I'm embarassed. it must have gone away after I was experimenting with the makefile and I ran make clean. I went into the ../src/ folder and executed java classsched.Main and it ran. But there was an error in the code with finding the text files.. I'm going to try and work with this for a quick second

Edit 1**
okay, I have a question.. Using the CSVReader.java and CSVParser.java.. they were originally in another package,
rob@rob-laptop:~/Desktop/ex/ClassSched/src$ ls
classsched opencsv-2.2

They were taken from opencsv-2.2 and I pulled out the files.. how can I compile my project while keeping the files within that other package?

Edit 2**
Alright, I decided to strip the CSVReader.java and CSVParser.java completely from its original package..
I replaced their original package with package classsched
I removed the folder csv2.2
I am still able to build and run my program successfully within Netbeans.. which is outputting a file called "assignments.csv"
But fter compiling with no errors, then running the program on the Linux environment, my program catches the "File Not Found exception".. any reason why it would work on Netbeans and not while running it on Linux?

Edit 3**
I got it to fully run and compile! I had to bring the .csv files outside to where /src/ is so I can see classsched directory, and the csv files.. Now I need to learn how to compile it with makefile..