Forums Register Login

package org.apache.commons.io does not exist

+Pie Number of slices to send: Send
Hi,

Iam getting error like this when i compile through terminal/console ..But it is running fine in eclipse

error: package org.apache.commons.io does not exist
import org.apache.commons.io.FileUtils;
^
./com/multunus/aliens/services/SystemFileServices.java:101: error: cannot find symbol
FileUtils.copyFile(new File(backupFolderName+"/"+csvExportPluginFile), CsvExportPlugin);
^
symbol: variable FileUtils
location: class SystemFileServices



what am i wrong.Please help...Appreciating any help..Advance Thanks


+Pie Number of slices to send: Send
It looks like the required jar file is missing from the classpath. While running through eclipse, you must have added the jar in the .class file which is visible to eclipse only. So, if you want to make the jar file available, you will have to pass the jar file as part of the command.
+Pie Number of slices to send: Send
Hey ryan,thanks for Your quick response.

Please tell me how to pass jar file as part of the command.

Advance thanks
+Pie Number of slices to send: Send
There are couple of ways to add jar files to classpath through command prompt. One of them:

if you are using Windows, then you can use something like:

javac -cp ".;<path of your jar>" Something.java
javac -cp ".;/home/path/jar1.jar;/home/path/jar2.jar" Something.java

I have not used in Unix though. You can find easily that in net.
+Pie Number of slices to send: Send
Ok Thanks ryan..
Did you miss me? Did you miss this tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 13719 times.
Similar Threads
Unable to import javabean class in servlet
Getting error while compling the First Java file
Can't compile
Compler Errors
package javax.servlet.http does not exist
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 03:55:57.