Java Question Library with more than one Class?

drloosi

Member
Licensed User
Longtime User
Hi everybody,

first of all, thanks for all these tutorials on building custom libraries! They are really awesome and helped me a lot.
But now I have come to a point, where my knowledge in Java and especially Eclipse may have exceeded.
My Library should contain two classes (lets name then Alpha and Beta). Alpha does some operations and returns the result as a Beta object.

My problem: I am able to declare an instance of Alpha in B4A, but the declaration of a Beta object which would take the results of Alpha is not possible. Beta is just not listed by the IDE, when i do my declarations.

So what did I miss? I added a second class to my package in Eclipse, added the necessary imports for B4A like in the first class, added a ShortName, updated the JavaDoclet for both classes and rebuilt the whole thing.

Is there any checkbutton i may have missed to check or something? ;)


Thanks for your help,
drloosi
 

drloosi

Member
Licensed User
Longtime User
Thank you agraham! It works! :)

Anyway my attempt was diffrent than yours: I did not make Beta a subclass of Alpha. Instead I declared each class in a different .java file which were both part of the same package.

Thanks again for your help!!
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
I don't think that BADoclet can cope with that. Erel?
There is no problem with multiple java files.

For example this is the "core" library:
SS-2012-01-30_09.22.00.png
 

thedesolatesoul

Expert
Licensed User
Longtime User
I know its an old thread, but I wanted to add some info since I hit the same problem twice.

Sometimes the Doclet will not generate xml for multiple classes in different java files. It generates a zero byte file (for me).
This usually happens if you have the following annotations in *more than one* class. Delete it from all but one.

B4X:
@BA.Version(1)
@BA.Author("thedesolatesoul")
 
Top