Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

package org.apache.commons.io does not exist  RSS feed

 
Priya chek
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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


 
Amar Saikia
Ranch Hand
Posts: 43
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Priya chek
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey ryan,thanks for Your quick response.

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

Advance thanks
 
Amar Saikia
Ranch Hand
Posts: 43
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Priya chek
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok Thanks ryan..
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!