Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7175575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:19:37+00:00 2026-05-28T16:19:37+00:00

By running System.loadLibrary(myAPI) , I verified that the DLL file myAPI.dll can be successfully

  • 0

By running System.loadLibrary("myAPI"), I verified that the DLL file “myAPI.dll” can be successfully loaded into my Eclipse Java project. Now I need to call methods specified inside this DLL file from my Java code. To do this, I added JNA to my Java project. Then I wrote the below-given code snippet that should be able to get instances of classes IProject and ProjectFactory (specified in the DLL file).

I still don’t understand how to properly implement this with JNA. I checked different threads, e.g. this one, but the ones I checked don’t provide an answer. Any help is highly appreciated. Thanks.

import com.sun.jna.Library;
import com.sun.jna.Native;   

public class MyClass {

public interface myAPI extends Library {
    //...
}

void LoadProj() {
    myAPI api = (myAPI) Native.loadLibrary("myAPI",myAPI.class);
    String fileName = "xxx.sp";


    IProject project; // this is wrong but shows what I am trying to do
    try {
        project = ProjectFactory.LoadProject(fileName);
    }
    catch (Exception ex) {
        MessageBox.Show(this, ex.Message, "Load failure");
    }
}
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T16:19:38+00:00Added an answer on May 28, 2026 at 4:19 pm

    Not sure what problem you are facing but as a practice your myAPI interface should declare all the methods verbatim with appropriate parameter mapping. I don’t see any methods inside your interface.

    Please checkout the this link as well as the link mentioned above by @Perception

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When running performance tests file system cache hit or miss can significantly influence test
I have a Java application, built with eclipse, that uses QTJambi. Running the application
I am running a live system that is currently serving about 20K pages a
Perl supports three ways (that I know of) of running external programs: system :
Say I have a couple of java runtime environments running on my system which
I have a content management system running on a web server, that among others
I'm working with an embedded system running QNX that has a stripped-down shell (KSH).
I have compiled a JNI dll that I would like to load into my
I have a program that will be running several system commands. The simplest way
In a system running kernel version 2.6.38 I see this sysfs file which shows

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.