Other B4A Libraries with NetBeans

Jhonn

Member
On NetBeans

I created this watching video over eclipse, and ajust the same configuration for NetBeans whitout know, this is may really FirstLib for B4A with NetBeans, without never used eclipse

Important: Java 6 or 7 required, with Java 8 not works

  1. Menu / Tools / Plugins -> Installs or active this Plugins "Java" and "QuickOpener"
  2. Create a new Java Library Project named "FirstLib"
  3. Menu Run / Set Configuration / Customize
    1. Libraries - Compile - Add Jar/Folder -> add android.jar, B4aShared.jar, Core.jar.
    2. Documenting -> Additional Javadoc options: -b4target c:\users\YOURUSER\Desktop\FirstLib.xml -doclet BADoclet -docletpath c:\users\YOURUSER\downloads\
  4. Write code:
    B4X:
    package anywheresoftware.b4a.sample;
    
    import anywheresoftware.b4a.BA.ShortName;
    /**
    *
    * @author Jhonn
    */
    @ShortName("FirstLib")
    public class FirstLib {
        /*
        * Multiplica el parámetro pasado por 2.
        */
        public int multiply(int x) {
            return x * 2;
        }
    }
  5. Menu Run / Build Project(FirstLib)
  6. Menu Run / Generate Javadoc(FirstLib)
  7. Copy two output files "FirstLib.jar" and "FirstLib.xml" (locate in path your write in step 3.2 -b4target )(c:\Users\YOURUSER\Documents\NetBeansProjects\FirstLib\dist) to folder "C:\Program Files\Anywhere Software\Basic4android\Libraries"
  8. Open B4A IDE, and Click on Library Manager and select FirstLib
  9. Write your code in B4a some like:
    B4X:
    Dim f As FirstLib
    For i = 0 To 10
         Log(f.multiply(i))
    Next
  10. And Run
 
Last edited:
Top