B4J Question [BANano] [SOLVED] Library Compilation FileNotFoundException

Mashiane

Expert
Licensed User
Longtime User
Hi there

Just a quick question, perhaps I'm missing something...

When creating a library and you added the library resources, eg, css and js files in the Files tab, on compilation, do you have to copy these resources to your b4j libraries too? There is an error of file not found..

Error: Project copying jquery-3.3.1.min.js (from b4j libraries folder)
My b4j libraries path is c:\myapps\b4j\libraries

CompileToLibrary.png
 

alwaysbusy

Expert
Licensed User
Longtime User
When doing the two step library creation, you end up with this in your Additional Libraries folder:
B4X:
yourlib.js
yourlib.dependsOn
yourlib.jar
yourlib.xml
yourlib.php (if you have used inline php in your library)
yourlib_Files.zip (if you had assets in your Files tab)

Then for using it:

Make a new B4J UI project, and the BAnano.jar and yourlib.jar in the libraries.
also, unzip the yourlib_Files.zip file to your projects Files folder (watch out that you do not make a subfolder!).
 
Upvote 0

Mashiane

Expert
Licensed User
Longtime User
When doing the two step library creation, you end up with this in your Additional Libraries folder:
B4X:
yourlib.js
yourlib.dependsOn
yourlib.jar
yourlib.xml
yourlib.php (if you have used inline php in your library)
yourlib_Files.zip (if you had assets in your Files tab)

Then for using it:
Noted with thanks, yes, this seems to be doing everything as you have noted. Perhaps the issue of the filenotfound is not a biggie because everything works as expected, anyway, I have attached a purpoted BANano library here to reproduce what i'm saying as this happens when creating a library. The lib does not have any components but just the 4 files in the Files tab for demonstrating. Please just run the project to see what Im talking about.

I could be doing something wrong I dont know, however the files are zipped in my libraries folder so I'm not really sure why... its error logging...

B4X:
java.io.FileNotFoundException: C:\MyApps\b4j\Libraries\scripts\jquery-1.11.3.min.js (The system cannot find the path specified)
 

Attachments

  • BANanoLibTest.zip
    117.8 KB · Views: 362
Upvote 0
Top