B4A Library [Tool] Simple Library Compiler - Build libraries without Eclipse

Status
Not open for further replies.

B4JExplorer

Active Member
Licensed User
Longtime User
Not able to do this. Was able to generate the jar and xml, but when attempting to load it, there's an error about parsing libraries, that a routine already exists. I went ahead and removed the duplicate class files that contained that routine, and regenerated, but get the same error.

Sorry, but this is too complicated. Too many hoops to jump through, just to make an existing jar - that works everywhere else, as is - operate in the B4J world. I'll return to this, sometime in 2014.

I'm still very appreciative that this is being developed, and look forward to seeing how it evolves.
 

LucaMs

Expert
Licensed User
Longtime User
This will be my most hated post.

(I state that a long time ago I had seen the video tutorial on the construction of libraries and I also asked how to do, since it explained that you had to use "pure" Java code, non-Android. I did not get responses).

But if I knew well enough how to create libraries for B4A using Eclipse+Java ... why should I use B4A ?!?!?!

I use B4A just to keep myself away from the environment Eclipse / Java!

You could respond with sentences of your first post:

As I see it, it can be useful in two cases:
- Creating wrappers for 3rd party SDKs.
- Modifying and extending existing open source libraries.


but still I should be familiar with Eclipse + Java to do this.

Ok, this tool will be useful to those who will create libraries for B4A that I will use

(Fortunately, there are not "Unlike" in this site )
 
Last edited:

Sytek

Active Member
Licensed User
Longtime User

Attachments

  • parsingerror.jpg
    241.4 KB · Views: 381

Sytek

Active Member
Licensed User
Longtime User
The XML file should not include the native methods and fields. Add com.chilkatsoft to the ignore field (assuming that you code is in a different package).

Hello Erel Thank's for reply me.
Sorry but I get the same error

B4X:
Starting step: Compiling Java code.
Completed successfully.
Starting step: Creating jar file.
Completed successfully.
Starting step: Creating XML file.
Loading source file C:\SimpleLibraryCompiler\chilkat-9.4.1-android-rsa\src\chilkat.java...
Loading source file C:\SimpleLibraryCompiler\chilkat-9.4.1-android-rsa\src\chilkatJNI.java...
Loading source file C:\SimpleLibraryCompiler\chilkat-9.4.1-android-rsa\src\CkByteData.java...
Loading source file C:\SimpleLibraryCompiler\chilkat-9.4.1-android-rsa\src\CkDateTime.java...
Loading source file C:\SimpleLibraryCompiler\chilkat-9.4.1-android-rsa\src\CkDtObj.java...
Loading source file C:\SimpleLibraryCompiler\chilkat-9.4.1-android-rsa\src\CkPrivateKey.java...
Loading source file C:\SimpleLibraryCompiler\chilkat-9.4.1-android-rsa\src\CkPublicKey.java...
Loading source file C:\SimpleLibraryCompiler\chilkat-9.4.1-android-rsa\src\CkRsa.java...
Loading source file C:\SimpleLibraryCompiler\chilkat-9.4.1-android-rsa\src\CkString.java...
Loading source file C:\SimpleLibraryCompiler\chilkat-9.4.1-android-rsa\src\SWIGTYPE_p_CkStringArray.java...
Loading source file C:\SimpleLibraryCompiler\chilkat-9.4.1-android-rsa\src\SWIGTYPE_p_int.java...
Loading source file C:\SimpleLibraryCompiler\chilkat-9.4.1-android-rsa\src\SWIGTYPE_p_JNIEnv.java...
Loading source file C:\SimpleLibraryCompiler\chilkat-9.4.1-android-rsa\src\SWIGTYPE_p_unsigned_char.java...
Loading source file C:\SimpleLibraryCompiler\chilkat-9.4.1-android-rsa\src\SWIGTYPE_p_void.java...
Loading source file C:\SimpleLibraryCompiler\chilkat-9.4.1-android-rsa\src\SWIGTYPE_p___int64.java...
Loading source file C:\SimpleLibraryCompiler\chilkat-9.4.1-android-rsa\src\SYSTEMTIME.java...
Constructing Javadoc information...
[-doclet, BADoclet]
[-docletpath, C:\SimpleLibraryCompiler]
[-bootclasspath, C:\android\sdk\platforms\android-11\android.jar]
[-classpath, C:\Program Files\Anywhere Software\Basic4android\Basic4android.exe\../libraries\B4AShared.jar;C:\Program Files\Anywhere Software\Basic4android\Basic4android.exe\../libraries\Core.jar;]
[-sourcepath, src]
[-b4atarget, C:\Program Files\Anywhere Software\Basic4android\Libraries\firmarsa.xml]
starting....
Working with class: com.chilkatsoft.chilkat
No ShortName annotation found for class: chilkat
Working with class: com.chilkatsoft.chilkatJNI
No ShortName annotation found for class: chilkatJNI
Working with class: com.chilkatsoft.CkByteData
No ShortName annotation found for class: CkByteData
Working with class: com.chilkatsoft.CkDateTime
No ShortName annotation found for class: CkDateTime
Working with class: com.chilkatsoft.CkDtObj
No ShortName annotation found for class: CkDtObj
Working with class: com.chilkatsoft.CkPrivateKey
No ShortName annotation found for class: CkPrivateKey
Working with class: com.chilkatsoft.CkPublicKey
No ShortName annotation found for class: CkPublicKey
Working with class: com.chilkatsoft.CkRsa
No ShortName annotation found for class: CkRsa
Working with class: com.chilkatsoft.CkString
No ShortName annotation found for class: CkString
Working with class: com.chilkatsoft.SWIGTYPE_p_CkStringArray
No ShortName annotation found for class: SWIGTYPE_p_CkStringArray
Working with class: com.chilkatsoft.SWIGTYPE_p_int
No ShortName annotation found for class: SWIGTYPE_p_int
Working with class: com.chilkatsoft.SWIGTYPE_p_JNIEnv
No ShortName annotation found for class: SWIGTYPE_p_JNIEnv
Working with class: com.chilkatsoft.SWIGTYPE_p_unsigned_char
No ShortName annotation found for class: SWIGTYPE_p_unsigned_char
Working with class: com.chilkatsoft.SWIGTYPE_p_void
No ShortName annotation found for class: SWIGTYPE_p_void
Working with class: com.chilkatsoft.SWIGTYPE_p___int64
No ShortName annotation found for class: SWIGTYPE_p___int64
Working with class: com.chilkatsoft.SYSTEMTIME
No ShortName annotation found for class: SYSTEMTIME
finish: C:\Program Files\Anywhere Software\Basic4android\Libraries\firmarsa.xml

Completed successfully.
*** Don't forget to refresh the libraries list in the IDE (right click and choose Refresh) ***

View attachment 22904
 

Sytek

Active Member
Licensed User
Longtime User

Hello Thank's for the reply
I'm sorry I took the source code from here http://www.chilkatsoft.com/download/chilkat-9.4.1-android-rsa.zip
I don't know where to put the version info.
But I edit the chilkat.java and put the following

package com.chilkatsoft;

import anywheresoftware.b4a.BA;
//import anywheresoftware.b4a.BA.ActivityObject;
import anywheresoftware.b4a.BA.ShortName;
import anywheresoftware.b4a.BA.Version;

@Version(1.0f)
@ShortName("chilkatsoft")
//@ActivityObject
//@Author("chilkatsoft")


............
..And the version does not appear thank's for considering myself
Best Regards
 

v150klaus

Member
Licensed User
Longtime User
Hello, does the simplelibrary Compiler works under win8 64bit?
The simplelibrary Compiler did not start !?
 

v150klaus

Member
Licensed User
Longtime User
starting " B4J_LibraryCompiler " Error = cannot find B4j ini file
starting "LibraryCompiler" Error = additional libraries folder must be set in the IDE "
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
starting " B4J_LibraryCompiler " Error = cannot find B4j ini file
Do you want to create a B4J library? Is B4J installed?

starting "LibraryCompiler" Error = additional libraries folder must be set in the IDE "
Open Tools - Configure Paths (in B4A IDE) and set the path of the additional libraries folder. The libraries will be created there.
 

v150klaus

Member
Licensed User
Longtime User
Thanks Erel.
Now it works !
I want to create a wrapper (library) for Sony SDK for the smartextensions.
Hope it works. I will start with the examples for simple libray Compiler.
 
Last edited:

Alberto Iglesias

Well-Known Member
Licensed User
Longtime User
Dear advanced users,

I have a library project in Eclipse, and compile very well, but not generate the .JAR FILE and in the SIMPLE LIBRARY COMPILE, i got a error.. look in attachment screenshot

if I remove the import com.google.android.glass.app.Card; and the functions related, works in SLC, where I need to put the GDK.jar to compile ok?

Or maybe, how to do to compile .JAR automaticly in ECLIPSE?

Thanks.....
 

Attachments

  • ErrorSLC.jpg
    232.1 KB · Views: 333
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…