JNA build on Linux local Virtual Machine

27 views
Skip to first unread message

Deepali Gadiyar

unread,
Jun 20, 2023, 12:53:56 PM6/20/23
to Java Native Access
Hi, i'm new to java programming and recently i've been asked to incorporate JNA in one of the projects that I'm working. So i just wanted to know how to do the build and other process from scratch. As of now, i've cloned the repository into my VM. Any assistance would be really helpful. Thanks in advance :)

Tres Finocchiaro

unread,
Jun 20, 2023, 1:38:37 PM6/20/23
to jna-...@googlegroups.com
Hi,

Instructions for building are available here: 


If you need to cross-compile, I believe the wiki will need to be updated.

On Tue, Jun 20, 2023 at 12:53 PM Deepali Gadiyar <deepali...@gmail.com> wrote:
Hi, i'm new to java programming and recently i've been asked to incorporate JNA in one of the projects that I'm working. So i just wanted to know how to do the build and other process from scratch. As of now, i've cloned the repository into my VM. Any assistance would be really helpful. Thanks in advance :)

--
You received this message because you are subscribed to the Google Groups "Java Native Access" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jna-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jna-users/4deac746-87e6-45ae-9e7f-e1f3691fd4adn%40googlegroups.com.

Deepali Gadiyar

unread,
Jun 21, 2023, 4:18:59 AM6/21/23
to Java Native Access
Thank you for the guidance. Although, I got an error at the end while building the project:
BUILD FAILED
/home/deepali/jniautogen/jna/build.xml:1432: The following error occurred while executing this line:
/home/deepali/jniautogen/jna/contrib/platform/build.xml:294: Problem: failed to create task or type junit
Cause: the class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask was not found.
        This looks like one of Ant's optional components.
Action: Check that the appropriate optional JAR exists in
        -/usr/share/ant/lib
        -/home/deepali/.ant/lib
        -a directory added on the command line with the -lib argument

Do not panic, this is a common problem.
The commonest cause is a missing JAR.

This is not a bug; it is a configuration problem
Any ways that i can fix this? Thanks in advance!!

Matthias Bläsing

unread,
Jun 21, 2023, 1:31:24 PM6/21/23
to jna-...@googlegroups.com
Hi,

Am Mittwoch, dem 21.06.2023 um 01:18 -0700 schrieb Deepali Gadiyar:
> Thank you for the guidance. Although, I got an error at the end while
> building the project:
> BUILD FAILED
> /home/deepali/jniautogen/jna/build.xml:1432: The following error
> occurred while executing this line:
> /home/deepali/jniautogen/jna/contrib/platform/build.xml:294: Problem:
> failed to create task or type junit
> Cause: the class
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTask was not found.
>         This looks like one of Ant's optional components.
>
>
> This is not a bug; it is a configuration problem
> Any ways that i can fix this? Thanks in advance!!

in the past this was caused by linux distributions only including a
subset of ant (or the user not installing all required packages).

Grab ant from https://ant.apache.org/ and use that.

Greetings

Matthias
Reply all
Reply to author
Forward
0 new messages