File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Zubi Pen
Greenhorn
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11343
Java Mac Safari
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
Zubi Pen
Greenhorn
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 101
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It appears that the Contstants class referenced here is not in the classpath.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic