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

Status
Not open for further replies.

xiaoyao

Active Member
Licensed User
Longtime User
i has this error ,how to fix?
 

thedesolatesoul

Expert
Licensed User
Longtime User
It creates a string with all the java files and calls javac to compile it. The string is created dynamically so it is not simple to post it.
I was afraid of that.
Are you willing to open source it on github so i can fork it?
Or alternatively, I guess I need to do a .java file traversal, I can write a script in Python to do that.
Thanks
 
Last edited:

klarsys

Active Member
Licensed User
Longtime User
I recently updated B4A to v4.30

Now, when I try to compile a library, I get this error: package anywheresoftware.b4a does not exist

I have added android.jar, B4AShared.jar and Core.jar in referenced libraries.

What could go wrong?

I updated SLC also to v1.02, still get the same error.
 

klarsys

Active Member
Licensed User
Longtime User
You don't need to add these three jars. They will be added automatically.
Still get the same error.
If I do so, Eclipse starts showing numerous errors.

By the way, I get these error for library projects that were compiling earlier.

Does the library compiler exchange any information with B4A?
 

xiaoyao

Active Member
Licensed User
Longtime User

sometimes ,i use "netbeans" software to compile a library,it will show all error,and can fix it.because it's a very good ide for write java project.i can make it to jar,but it's hard to create the xml file.so how did i do? i create a empty jar project the same name like my library ,only with the method,so it make xml file quick,so i make jar by real java code ,and make xml file by netbeans.

in fact my jar with about more Hundreds of classes.it also can't compile with "LibraryCompiler.exe"
some times ,LibraryCompiler.exe can't compile some project,if classes is tool big.
netbeans setup ok with 628 MB disk size.you can try.


Your question I concrete is less clear. These are some of my development experiences, for reference only. If you need this, also can come to ask me.
 

klarsys

Active Member
Licensed User
Longtime User
SLC takes the path to android.jar and to B4A core libraries from the IDE ini file.
I feel SLC is not able to find B4A libraries. Is there any way I can debug it?
Is anything case sensitive by any chance?
 

klarsys

Active Member
Licensed User
Longtime User
Can you post the full message from SLC window?

Sure:

B4X:
Starting step: Compiling Java code.
javac 1.8.0_05
D:\klarsys\b4alibs\WifiManager\src\com\klarsys\b4a\WifiManagerWrapper.java:5: error: package anywheresoftware.b4a does not exist
import anywheresoftware.b4a.BA;
                           ^
1 error


Error.
 

klarsys

Active Member
Licensed User
Longtime User
Also attaching Eclipse project, I just started with it.
 

Attachments

  • WifiManager.zip
    4 KB · Views: 313

klarsys

Active Member
Licensed User
Longtime User
I confirm it is LibraryCompiler.exe

I did some hacking to find that it uses following argument when compiling, which indicates some issue with getting B4A path:
B4X:
-sourcepath src -cp "C:\Windows\system32\OpenWith.exe\../libraries\B4AShared.jar";"C:\Windows\system32\OpenWith.exe\../libraries\Core.jar";

I don't know how it gets "C:\Windows\system32\OpenWith.exe", if you can share some insights, it can be fixed.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…