Android Question ECLIPSE can compile project, SLC doesn't. I do something wrong

rosippc64a

Active Member
Licensed User
Longtime User
Hi All,
I took out a project from a few years ago to play a little with Eclipse / SLC. I installed the latest Eclipse, compiled with it and tried to compile with SLC too, but I get the following: "error: package com.ssicod.print.escpos does not exist import com.ssicod.print.escpos.PrinterAPI;" This package is in icod_print_2.0.jar, attached to the project (since eclipse can compile).
I am doing something wrong, but what?
slc.jpg
 
Thanks for your quick response, but I do fault something else. I moved my jar lib only to lib folder, but the error remains:
1648449086578.png
 
Upvote 0
The eclipse compiles happily :), so I think there is no typo.
If I change import com.szsicod.print.escpos.PrinterAPI; to import com.szsicod.print.escpos.*;
the error moves to error: package com.szsicod.print.io does not exist import com.szsicod.print.io.BluetoothAPI;
If I change to import com.szsicod.print.io.*;, the error moves on...
 
Last edited:
Upvote 0
As far as I know SLC (by design) expects the same project structure as Eclipse so if it is not compiling I can't help. However I see you are using Java 11. SLC, or strictly BADoclet, does NOT like Java 11 and will error or, worse, produce malformed XML files. This is a long standing problem that Erel needs to sort out some time soon but for now you need to use Java 8. SLC uses the the same Java as B4A so you change it there in Tools -> Configure Paths and close the IDE before using SLC.
 
Upvote 0
Thank you Agraham, I tried so, but same result.
B4X:
Starting step: Compiling Java code.
javac 1.8.0_201
c:\Users\Pisti\workspace\MyIZPPrint\src\anywheresoftware\b4a\MyIZPrint\MyIZPrint.java:12: error: package com.szsicod.print.escpos does not exist
import com.szsicod.print.escpos.PrinterAPI;
1 error
Error.
 
Upvote 0
I will once more point out that you got advice from @DonManfred in #2 that you seem to not follow in #3. Hence my comment about "libs" != "lib".

I have no idea if this is the problem, I'm just pointing out a discrepancy.
 
Upvote 0
Thanks for All!
Now I can compile the project (only some doclet warnings remained) and I tried include my lib into a b4a project what compiled also with success. Thanks @Sandman (now I can understand lib - libs difference regarding SLC) and @DonManfred (you underestimate my abilities :-)
1648462484139.png
 
Upvote 0
only some doclet warnings remained
you need to fill the classname into the b4ignore field which are not part of your wrapper. Only your wrapper-code should contains a ShortName...
Add com.szsicod to this field.
 
Last edited:
Upvote 0
Back
Top