Java Question Doubt regarding import in Java and B4A

Discussion in 'Libraries developers questions' started by kepler, Mar 9, 2015.

  1. kepler

    kepler Active Member Licensed User

    Good afternoon,

    I really have two doubts (maybe someone can help me out please):

    1) When I have 2 java files, for instance, and one of them needs the other, how do I write the import line? I've tryed import Module1 - example - but when I compile with SLC it gives me an error of not found, even if the 2 files are in the same folder... :confused:

    2) In a B4A project, if I include in libs a particular .jar file (say MyLib.jar), what is the procedure to use it? How do I call a function from that lib - example function1 (of course I know the parameters)? Must I declare something first? Can someone give me a pratical example?

    Kind regards, and sorry for the trouble... :rolleyes:

    Kepler
     
  2. thedesolatesoul

    thedesolatesoul Expert Licensed User

    1. Use the full package name in the import.
    2. It depends on the jar file. Normally there will be a class you need to instantiate that will have the member functions.
     
    DonManfred likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice