B4J Question how to create library with B4J

Roberto P.

Well-Known Member
Licensed User
Longtime User
I want to create a library with B4J, containing generic functions for use with another Java program.

I did two tests with new project "UI" and "NON UI".

When I try to generate the library from the following error:

Compiling code. error
No modules to compile.
Compilation:
main


I try to remove the main module from the project menu but it does not allow it.


can you tell me how to do it?

thank you
 

DonManfred

Expert
Licensed User
Longtime User
Create a Class with the functionality, compile it to a library and use the compiled library in your projects then.
 
Upvote 0

Roberto P.

Well-Known Member
Licensed User
Longtime User
OK thanks

but I would like to create more classes in the project and save everything in one library. So I have to create a library for each class!
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
but I would like to create more classes in the project and save everything in one library.
No problem!
So I have to create a library for each class!
No!

As alwaysbusy already wrote, all modules in the project will be in the library except the Main module.
You can set #ExcludeFromLibrary on top of a module to exclude it from the library.
 
Upvote 0

Daestrum

Expert
Licensed User
Longtime User
I want to create a library with B4J, containing generic functions for use with another Java program.

Is the other java program created by b4j or is it a native java program?
 
Upvote 0

Roberto P.

Well-Known Member
Licensed User
Longtime User
I created the library. But I can not use it from a program written in Java. Can the B4j libraries only work for B4J \ B4A?
 
Upvote 0
Top