Forums Register Login

Compiling In console

+Pie Number of slices to send: Send
Hi,
below are the files I do have:
1.D:\Console\FileDownlaod.java
2.D:\Console\XmlGenerator.java
3.D:\Console\servlet-api.jar
4.D:\Console\log4j-1.2.8.jar

Now i am using :javac -classpath D:\Console\servlet-api.jar;D:\Console\log4j-1.2.8.jar D:\Console\FileDownlaod.java
So i have
5.D:\Console\FileDownlaod.class

XmlGenerator.java calles for the FileUpload class for a cetain functionality,so iah to compile FileUpload.ajava first.
Now how to compile the XmlGenerator.java:
I used:
1. javac -classpath D:\Console\servlet-api.jar;D:\Console\log4j-1.2.8.jar;D:\Console\FileDownlaod.class D:\Console\XmlGenerator.java
Errors I am getting:
1.error: error reading D:\Console\FileDownlaod.class; error in opening zip file
2.D:\Console\XmlGenerator.java:10:
cannot symbol : class FileDownlaod
location: package com.photo.servlet
import com.photo.servlet.FileDownlaod;

3. D:\Console\XmlGenerator.java:53: cannot find symbol
symbol : variable FileDownlaod
location: class com.photo.servlet.XmlGenerator
filelist = new File(FileDownlaod.ServerPath);

I even tried to convert the FileUpliad.class to .jar file and use it like servlet-api and log4j.jars , but it shows the below error
javac -classpath D:\Console\servlet-api.jar;D:\Console\log4j-1.2.8.jar;D:\Console\D:\Console\FileDownlaod.jar D:\Console\XmlGenerator.java.


Please tell me the valid syntax.


+Pie Number of slices to send: Send
Don't specify class files explicitly; specify the class directory only. Continue specifying jar files as you are now.
+Pie Number of slices to send: Send
If you want to include all the jars in a folder in the classpath, then include <directory path>\* in the classpath.

Also this question seems quite similar to your other topic to me...
I knew that guy would be trouble! Thanks tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


Reply locked
This thread has been viewed 1109 times.
Similar Threads
problem using javac with -classpath option
cannot find symbol : class HttpServletResquest
Not able to compile java files with Ant
HFSJ: Error while compiling servlet example
'package javax.servlet does not exist' error is coming
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 19, 2024 03:14:00.