PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV Mobile 2024 → including a jar file in windev
including a jar file in windev
Débuté par michaelangelo, 21 jan. 2020 06:37 - 5 réponses
Posté le 21 janvier 2020 - 06:37
Hi ,

anyone know how to add a jar file properly in windev? i tried adding a repository and added implementation in the dependecy by modifying the wdjava.build this works, but what i want to know is if i have my own jar file and wanted to add it not by using a repository. I tried adding it during generation but after that it seems the jar library is not getting read by the java code? what am i missing? thank you in advance for anyone who would help
Membre enregistré
794 messages
Popularité : +40 (42 votes)
Posté le 22 février 2020 - 14:55
Hi. I do it every day and I haven't had any problems using third-party JARs. You just add it in the options of the generation process.

What kind of error do you get as a result?

Rubén
Membre enregistré
5 messages
Posté le 27 février 2020 - 08:03
Hi,


after adding the jar for the generation it will have an error on the code i written in java procedure. in the import part its saying undeclared etc. Can you provide me a sample or guide on how you add and use the jar in your java code. ?Thank you in advance for the help
Membre enregistré
498 messages
Popularité : +8 (8 votes)
Posté le 27 février 2020 - 18:53
Hi

I have to do some code on java time to time
and about your problem it's maybe what you want to import it doesn't have a library for Android

What I mean?
well yes it's code on java but it's no all java itself it's more like what android have with Java code.
and because of that not all the librarys are available for Android

so we need to know what you want to do and what are you importing
also the java code on windev with a config on android it's just a normal method you can't do Classes with java
For what I know, if it is possible let me know that could be really helpful

--
Best Regards
ARV
Membre enregistré
794 messages
Popularité : +40 (42 votes)
Posté le 27 février 2020 - 19:46
Hi. You need know the packets imports you need for your library. Its diferent with each library. Use Google to search samples using your library.

Look at this post for a sample https://forum.pcsoft.fr/fr-FR/pcsoft.fr.windevmobile/38552-code-java-integrer-sur-windev-mobile/read.awp

Rubén
Membre enregistré
5 messages
Posté le 01 mars 2020 - 08:36
Hi,

I have an SDK from a device manufacturer, i tried adding the sdk through generation and its not detecting the sdk i think because its saying undeclared while if i add it thru online repository given also by the manufacturer the error is gone. The import errors are the sdk library name.. not the default android imports