JiggyMan Member Licensed User Longtime User Jul 6, 2015 #1 I've used the tutorial for creating some simple B4A libraries without any problems. They didn't do much, I just wanted to make sure I understood how to do it. Now I'm working on a real project and I've run into a snag. I downloaded the Apache Commons IO library and referenced it in my Eclipse project (Build Path > Configure Build Paths > Libraries > Add External JAR). I then imported it into my project: Code: Copy import org.apache.commons.io.*; I used the FileUtils class of this library in my project. Eclipse doesn't show any errors or warnings regarding the way I've used it but when I try to compile it with the Simple Library Compiler (great tool!), I get the following message: Starting step: Compiling Java code. javac 1.8.0_45 D:\eclipse_proj\forecast\src\com\frigginjiggy\forecast\Update.java:5: error: package org.apache.commons.io does not exist import org.apache.commons.io.*; ^ 1 error Click to expand... Can someone tell me if I've missed something, or done something wrong?
I've used the tutorial for creating some simple B4A libraries without any problems. They didn't do much, I just wanted to make sure I understood how to do it. Now I'm working on a real project and I've run into a snag. I downloaded the Apache Commons IO library and referenced it in my Eclipse project (Build Path > Configure Build Paths > Libraries > Add External JAR). I then imported it into my project: Code: Copy import org.apache.commons.io.*; I used the FileUtils class of this library in my project. Eclipse doesn't show any errors or warnings regarding the way I've used it but when I try to compile it with the Simple Library Compiler (great tool!), I get the following message: Starting step: Compiling Java code. javac 1.8.0_45 D:\eclipse_proj\forecast\src\com\frigginjiggy\forecast\Update.java:5: error: package org.apache.commons.io does not exist import org.apache.commons.io.*; ^ 1 error Click to expand... Can someone tell me if I've missed something, or done something wrong?
DonManfred Expert Licensed User Longtime User Jul 6, 2015 #2 add a line Code: Copy @DependsOn(values={"commons-io-2.4"}) and copy the file commons-io-2.4.jar to your additional libraries dir Upvote 0
add a line Code: Copy @DependsOn(values={"commons-io-2.4"}) and copy the file commons-io-2.4.jar to your additional libraries dir
JiggyMan Member Licensed User Longtime User Jul 6, 2015 #3 Thanks for the reply. Unfortunately, that did not make any difference. Any other suggestions? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jul 7, 2015 #4 You need to copy the commons jar file to the libs folder: https://www.b4x.com/android/forum/t...uild-libraries-without-eclipse.29918/#content Upvote 0
You need to copy the commons jar file to the libs folder: https://www.b4x.com/android/forum/t...uild-libraries-without-eclipse.29918/#content
JiggyMan Member Licensed User Longtime User Jul 7, 2015 #5 Yep, that did the trick. Somehow I totally missed that line when I read the tutorial. Thanks, Erel. Upvote 0