File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Ant, Maven and Other Build Tools and the fly likes Javac compile error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Javac compile error" Watch "Javac compile error" New topic

Javac compile error

kumar hai

Joined: Oct 12, 2009
Posts: 26
Hi..Please find the below error details...while compiling java file using javac i am getting the below error...

[javac] Compiling 4 source files to c:\ant\class
[javac] c:\ant\java.class\ package commonj.sdo does not exist
[javac] import commonj.sdo.DataObject;
[javac] ^
[javac] c:\ant\java.class\ cannot find symbol
[javac] symbol : class DataObject
[javac] location: class AMSLib.LogHelper
[javac] public String logMessage(DataObject bo1) throws Exception{
[javac] ^
[javac] 2 errors

C:\ant\javac.xml:34: Compile failed; see the compiler error output for details.

urgent.please help to resolve this issue...

Zandis Murāns
Ranch Hand

Joined: Aug 18, 2009
Posts: 174

"package commonj.sdo does not exis"
In common cases means that jar file containing such package is not found by compiler. Please provide compiler with this jar file (either by copying it in class path or specifying via javac parameter -classpath)
Peter Johnson

Joined: May 14, 2008
Posts: 5852

If Zandis' suggestion doesn't help you solve the problem, please post the contents of your build.xml file, and give the full path name for either the commonj.sdo.DataObject class file of the JAR containing that class file.

JBoss In Action
Siva Masilamani
Ranch Hand

Joined: Sep 19, 2008
Posts: 385
Try placing these jar file inthe classpath



Failure is not an option.
I agree. Here's the link:
subject: Javac compile error
It's not a secret anymore!