B4J Question Cannot find additional library

Mikelgiles

Active Member
Licensed User
Longtime User
I have added 3 additional librarys to

C:\Users\MikelGiles\AppData\Roaming\Anywhere Software\B4J\AdditionalLibraries

and have set the path to that directory. If I right click in the library window and choose Open Additional Library folder the jar files are there. But they do not show up in the Libraries Manager window even after refreshing the window so I cannot add anything to the project.
Do I need to do something other than putting the rar files in the folder and refreshing?
 

stevel05

Expert
Licensed User
Longtime User
The Additional Libraries need to be added to wherever you have set in Tools / Configure Paths dialog. And they need to be Jar files. If they are libraries written for B4x then you also need to copy the XML file that comes with it. Right click the librarys Manager list and click refresh they will then appear.

If you are adding a Jar to access using JavaObject, it won't appear in the Libraries list and you will need to add an #AdditionalJar: myjar (no extension) directive to the main module of the project.
 
Upvote 0

Mikelgiles

Active Member
Licensed User
Longtime User
Thanks Steve. I am sure that i have everything in the correct place so that leaves the possibility of them using JavaObject. I have no idea if they are or not. TGhe jar files are jRLlni.jar, jRLMsgDialogs.jar, and jTableViewExtended.jar. I will add the #AdditionalJar: myjar and see if that corrects the problem. Thanks very much!
 
Upvote 0

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
Try adding them to your "normal" libraries folder and see if the IDE recognizes them (after clicking on tools -> clean project), because it will be sadistic to do it via javaObject.
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
Hi Mike, I did a quick search on the forum, jRLini and JRLMsgDialogs should have xml files in the zip files along with them. You need to copy those to the additional files folder as well. Probably jTableViewExtended.jar should have as well.
 
Upvote 0

Mikelgiles

Active Member
Licensed User
Longtime User
Hi Steve, you were correct. All three files had matching xml files and all three showed up in the library manager after putting them in the folder. Now for the dumb question........Is JavaObject something I should stay away from? I have no experience in Java at all so all this library stuff is kinda new to me.
 
Upvote 0

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
JavaObject is a powerful tool, i use it a lot to access some hidden Java Api, but if there is already a library for B4X then it is of no use.

i mustly use it for inline java code.
 
Upvote 0

Mikelgiles

Active Member
Licensed User
Longtime User
The jTableViewExtended is what I was interested in because I did not like the way the standard tableview handles sorting dates. I dont like the idea of using a date format "YYYY/MM/DD" so it would sort correctly. However, after looking at the extra complexity of adding the Extended I decided to try a different method. I need to be able to change dates in the table and resort on the date column. I have been using VB6 and SharpGrid but Sharpgrid has been discontinued (more importantly VB6 and Sharpgrid will not work on Android nor iPhone). I also think that I do not have enough knowledge in B4J to start playing around with special libraries!
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
Yes, manipulating a Tableview's data is not simple, and will require the use of JavaObject. Attached is an example of using a hidden date column in the correct format to sort properly.
 

Attachments

  • SortHiddenDate.zip
    2.3 KB · Views: 227
  • Like
Reactions: DMW
Upvote 0

stevel05

Expert
Licensed User
Longtime User
Here is a better version that will sort based on the actual date using a comparator (No need for a hidden column) and will also sort when the column header is clicked.
 

Attachments

  • SortDate.zip
    2.2 KB · Views: 201
Upvote 0
Top