aspose file tools*
The moose likes Beginning Java and the fly likes how can do I run this java code and pass the pdf file ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "how can do I run this java code and pass the pdf file ?" Watch "how can do I run this java code and pass the pdf file ?" New topic
Author

how can do I run this java code and pass the pdf file ?

Zubi Pen
Greenhorn

Joined: Oct 24, 2007
Posts: 26
I have a java file called PdfFormGenerator.java and when I execute the file,
I get the following msg:

Exception in thread "main" java.lang.NoClassDefFoundError: student/bhc/PdfFormGenerator
Press any key to continue....

and when I compile the file I get the following two error msg:

cannot resolve symbol variable CLASS_LOCATION
cannot resolve symbol variable FORM_LOCATION

My question is, how can I use the Java file to pass the template.pdf file I have created, as thats what the java file is supposed to do?

Here is the code for the PdfFormGenerator.java file


Thanks,
[ October 31, 2007: Message edited by: Ket Pen ]
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Originally posted by Ket Pen:
...when I compile the file I get the following two error msg:

cannot resolve symbol variable CLASS_LOCATION
cannot resolve symbol variable FORM_LOCATION...

Welcome to JavaRanch!

These error messages should also be providing the line numbers on which these errors occur. Can you show us which lines are causing the errors?

If it's not compiling, then there won't be a class file to execute (which would cause a NoClassDefFoundError).


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Zubi Pen
Greenhorn

Joined: Oct 24, 2007
Posts: 26
Hi thanks for your reply. I am getting the error on the following two lines of the code:

private String classLocation = Constants.CLASS_LOCATION;
private String formLocation = Constants.FORM_LOCATION;

Its line number 8 & 9..

Thanks,
Zub
Adam Schaible
Ranch Hand

Joined: Oct 04, 2007
Posts: 101
It appears that the Contstants class referenced here is not in the classpath.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how can do I run this java code and pass the pdf file ?