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
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
- Menu / Tools / Plugins -> Installs or active this Plugins "Java" and "QuickOpener"
- Create a new Java Library Project named "FirstLib"
- Menu Run / Set Configuration / Customize
- Libraries - Compile - Add Jar/Folder -> add android.jar, B4aShared.jar, Core.jar.
- Documenting -> Additional Javadoc options: -b4target c:\users\YOURUSER\Desktop\FirstLib.xml -doclet BADoclet -docletpath c:\users\YOURUSER\downloads\
- 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; } }
- Menu Run / Build Project(FirstLib)
- Menu Run / Generate Javadoc(FirstLib)
- 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"
- Open B4A IDE, and Click on Library Manager and select FirstLib
- Write your code in B4a some like:
B4X:Dim f As FirstLib For i = 0 To 10 Log(f.multiply(i)) Next
- And Run
Last edited: