Java compiling error


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Java compiling error
# 1  
Old 12-05-2007
Computer 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(
# 2  
Old 12-05-2007
Quote:
Originally Posted by Katkota
AddCommentActionLogging.java:5: package org.apache.log4j does not exist
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.
# 3  
Old 12-05-2007
Could you please explain more?
# 4  
Old 12-05-2007
Quote:
AddCommentActionLogging.java:5: package org.apache.log4j does not exist
import org.apache.log4j.Category;
Find out the corresponding jars for each of the the import class/pkg and add those jars in the classpath and then start compiling.
# 5  
Old 12-05-2007
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).
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Compiling and Executing a Java File With a Shell Script

I'm trying to use a shell script to compile and execute a java file. The java classes are using sockets, so there is a client.java file and a server.java file, each with their own shell script. I also want to handle the command line arguments within the shell script, not the java classes. The... (1 Reply)
Discussion started by: britty4
1 Replies

2. UNIX for Beginners Questions & Answers

Error while compiling

Hi I am trying to compile a binary file (CASPER: Context-Aware Scheme for Paired-End Read) but I am getting the following error: user@user-OptiPlex-780 make g++ -O2 -Wall -fopenmp -c -o merge.o merge.c merge.c:8:35: fatal error: boost/unordered_map.hpp: No such... (2 Replies)
Discussion started by: Xterra
2 Replies

3. AIX

Compiling snckrb5.o error

Hi Everyone, Greetings. We are trying to compile snc adapter to work with AIX 5.3 and Windows AD. The compiled library snckrb5.o is failing with the error code as follows 0509-102 The size of the auxiliary header is invalid. 0509-194 Examine file headers with the 'dump -ohv'... (0 Replies)
Discussion started by: madhav.kunapa
0 Replies

4. AIX

Unable to correct NMONVisualizer java error. Can someone help to decode this java error?

Hello AIX and Java gurus, I have a java error that I have no clue how to resolve. I am trying to run the popular NMONVisualizer utility against a NMON dataset and getting the error as shown below: /db2storage/NMON >java -jar NMONVisualizer_2015-02-02.jar com.ibm.nmon.ReportGenerator... (1 Reply)
Discussion started by: okonita
1 Replies

5. Solaris

ERROR while compiling

Hi guys i came across an error while compiling a c file in solaris using gcc. the error is, Undefined first referenced symbol in file bind /var/tmp//ccAr8qAh.o accept ... (4 Replies)
Discussion started by: rajeshb6
4 Replies

6. Programming

Error with compiling

Hi guys. I have a header file: unp.h like this: #ifndef _UNP_H_ #define _UNP_H_ extern ssize_t readn(int filedes, void *buff, size_t nbytes); extern ssize_t writen(int filedes, const void *buff, size_t nbytes); extern void err_quit(const char *msg); #define TRUE 1 #define FALSE 0 ... (2 Replies)
Discussion started by: majid.merkava
2 Replies

7. Shell Programming and Scripting

Compiling all modified Java files in a folder on Unix

Hi all, I have a Unix script that will compile all Java files in a sub folder as follows: find . -name "*.java" -print -exec $JAVA_HOME/bin/javac -cp .:$CLASSPATH '{}' \; I would like to enhance it to only compile those Java files who: 1.) Have no class file 2.) Have a class file... (1 Reply)
Discussion started by: Annorax
1 Replies

8. Programming

Java Compiling Help**URgent**

I am compling simple java program HelloWorld.java although /usr/bin @ this path javac is present, is there any command line wherein i can pass the this option as well lik javac -opttion(javac path) filename.java as i do not have permissions to set path. Also wht does this error, means...... (0 Replies)
Discussion started by: niceboykunal123
0 Replies

9. Programming

Compiling Error

Hi, I have installed "Freetype2" library in my SuSe Linux 9.3 version system. When Iam compiling a program, I am getting these below errors. Undefined reference to "FT_Init_FreeType" Undefined reference to "FT_Load_Char" Please show me a solution? Thank you. With regards, Chandramouli (1 Reply)
Discussion started by: chandra80
1 Replies

10. Solaris

question about JAVA compiling ..

Hi , I don't know if this is the right place to post my question because it relates to JAVA . I am beginner of JAVA , using a tutorial as reference I am trying to run a simple program in JAVA env. I have installed JDSK kit from java.sun.com but when I tried to run a program from the DOS prompt , I... (7 Replies)
Discussion started by: ANAMIKA56
7 Replies
Login or Register to Ask a Question