Java compiling error

I need Help folks;
I'm very new to Java & i was trying to compile some java files & i got a lot of errors (see below), could some one tell me what am i doing wrong?

These are the files i need to compile:

AddCommentActionLogging.java
EditPageActionLogging.java

When i run:
/opt/jdk1.5.0_08/bin/javac *.java

I get these errors:

AddCommentActionLogging.java:3: package com.atlassian.confluence.pages.actions does not exist
import com.atlassian.confluence.pages.actions.AddCommentAction;
^
AddCommentActionLogging.java:5: package org.apache.log4j does not exist
import org.apache.log4j.Category;
^
AddCommentActionLogging.java:7: cannot find symbol
symbol: class AddCommentAction
public class AddCommentActionLogging extends AddCommentAction
^
AddCommentActionLogging.java:9: cannot find symbol
symbol : class Category
location: class com.ptc.ssp.se.tools.confluence.AddCommentActionLogging
private static Category log = Category.getInstance(
^
EditPageActionLogging.java:3: package com.atlassian.confluence.pages.actions does not exist
import com.atlassian.confluence.pages.actions.EditPageAction;
^
EditPageActionLogging.java:5: package org.apache.log4j does not exist
import org.apache.log4j.Category;
^
EditPageActionLogging.java:7: cannot find symbol
symbol: class EditPageAction
public class EditPageActionLogging extends EditPageAction
^
EditPageActionLogging.java:9: cannot find symbol
symbol : class Category
location: class com.ptc.ssp.se.tools.confluence.EditPageActionLogging
private static Category log = Category.getInstance(

This looks like a major problem. I suggest you set up your CLASSPATH to include all the various places that contain the Java code you are going to reference.

Could you please explain more?

Find out the corresponding jars for each of the the import class/pkg and add those jars in the classpath and then start compiling.

Using a tool such as Apache Ant will make it easier for compiling projects with complicated class paths by putting the build instructions in a build file (similar to Makefile).