B4J Question JavaObject issue

Arie van Wingerden

Member
Licensed User
Hi all,

in the first place: I bought B4A years ago, but because of my invalidating health, I couldn't do much with it.
Now i try to get a bit done with B4J, just as a hobby, because my health is still not ok.

I searched the forum for JavaObject and saw a few good examples.
However in my little program, I get this error:
--- Are you missing a library reference? (referring to line 8) ---
but in the examples I found I found no explicit "import" of any sorts.

I found a javaobject.jar in "....\B4J\Libraries" and added that path to Tools | Configure paths | Additional Libraries,
but that doesn't work either.

Obviously I am missing something obvious ...

Please help!

TIA,
Arie

Declare a Java Object fails:
'Non-UI application (console / server application)
#Region Project Attributes
    #CommandLineArgs:
    #MergeLibraries: True
#End Region

Sub Process_Globals
    Private jo As JavaObject
End Sub

Sub AppStart (Args() As String)

End Sub
 

DonManfred

Expert
Licensed User
Longtime User
I found a javaobject.jar in "....\B4J\Libraries" and added that path to Tools | Configure paths | Additional Libraries,
but that doesn't work either.
It is the wrong solution. The Internal Library path should NOT be set as the additional libary folder.
Use any other folder for additional libaries.

About the JavaObject. JavaObject is, as you found out, a internal library. You just need to check it in the library tab.
 
Upvote 0

Arie van Wingerden

Member
Licensed User
I suppose you mean: go to menu item Windows | Libraries manager (which shows a widget listing all internal libraries) and then check JavaObject.

Despite the fact that I have read quite a bit of the docs, it is was not obvious (for me and probably other newcomers as well) what you meant with "the library tab".

Anyway. Thanks very much for the help and nice to "meet" you DonManFred.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…