Why is my dll not loaded in this JAVA code?Is Java “pass-by-reference” or “pass-by-value”?What is a serialVersionUID and why should I use it?How do I read / convert an InputStream into a String in Java?How do I generate random integers within a specific range in Java?Creating a memory leak with JavaWhy is subtracting these two times (in 1927) giving a strange result?Why don't Java's +=, -=, *=, /= compound assignment operators require casting?Why is char[] preferred over String for passwords?Why is processing a sorted array faster than processing an unsorted array?Can't find dependent libraries

Exact Brexit date and consequences

Are programming languages necessary/useful for operations research practitioner?

Why does F + F' = 1?

What's the biggest organic molecule that could have a smell?

Why the word "rain" is considered a verb if it is not possible to conjugate it?

Why was "leaping into the river" a valid trial outcome to prove one's innocence?

Might have gotten a coworker sick, should I address this?

Can I cast Sunbeam if both my hands are busy?

My research paper filed as a patent in China by my Chinese supervisor without me as inventor

Seized engine due to being run without oil

Why did it become so much more expensive to start a university?

Do all humans have an identical nucleotide sequence for certain proteins, e.g haemoglobin?

Were Roman public roads build by private companies?

Georgian capital letter “Ⴒ” (“tar”) in pdfLaTeX

ArcMap not displaying attribute table?

Should I leave the first authourship of our paper to the student who did the project whereas I solved it?

Is it possible to PIVOT on a LIKE statement

How to help my 2.5-year-old daughter take her medicine when she refuses to?

How to work with a technician hired with a grant who argues everything

How can I maximize the impact of my charitable donations?

How to save PDFs from web for offline reading on an iPad?

Gas pipes - why does gas burn "outwards?"

Converting multiple assignment statements to single comma separated assignment

Insert str into larger str in the most pythonic way



Why is my dll not loaded in this JAVA code?


Is Java “pass-by-reference” or “pass-by-value”?What is a serialVersionUID and why should I use it?How do I read / convert an InputStream into a String in Java?How do I generate random integers within a specific range in Java?Creating a memory leak with JavaWhy is subtracting these two times (in 1927) giving a strange result?Why don't Java's +=, -=, *=, /= compound assignment operators require casting?Why is char[] preferred over String for passwords?Why is processing a sorted array faster than processing an unsorted array?Can't find dependent libraries






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I have the following code that is supposed to load two dlls:



public class ArcgisJniNet 
static
System.load("D:/Users/User/Desktop/DLL/comCorporateProject.dll");
System.load("D:/Users/User/Desktop/DLL/FileGDBAPI.dll");


//Native method declaration
private native void FileGDBApi();


public void test()
ArcgisJniNet arcgisJniNet = new ArcgisJniNet();
arcgisJniNet.FileGDBApi();




However, when I deploy in karaf and run the service call, it throws the following error:



Caused by: java.lang.UnsatisfiedLinkError: 
D:UsersUserDesktopDLLcomCorporateProject.dll: Can't find dependent
libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)[:1.8.0_162]
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)[:1.8.0_162]
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)[:1.8.0_162]
at java.lang.Runtime.load0(Runtime.java:809)[:1.8.0_162]
at java.lang.System.load(System.java:1086)[:1.8.0_162]
at com.corporate.ex.services.arcgis.service.ArcgisJniNet.<clinit>
(ArcgisJniNet.java:5)


I already set in environment variable to include the path to the dll folder and restarted my computer but seems like I am still faced with this issue.



My C++ implementation looks like this:



#include "stdafx.h"

#include "comCorporateProject.h"

#include <FileGDBAPI.h>
using namespace FileGDBAPI;
using namespace std;

JNIEXPORT void JNICALL
Java_com_corporate_ex_services_arcgis_service_ArcgisJniNet_FileGDBApi
(JNIEnv *, jobject)
fgdbError hr;
Geodatabase gdb;
if ((hr =
CreateGeodatabase(L"D:/Users/User/Desktop/geodb/example.gdb", gdb)) !=
S_OK)

wcout << "An error occurred while creating the geodatabase.";

wcout << "An error occurred while creating the geodatabase.";
CloseGeodatabase(gdb);



My intention is to invoke the c++ function from the java code jar that will be deployed in the server. I'm not sure why it is telling me it cannot find the dll when I have provided the right absolute path. Please point out the mistake I have made. Thanks for your guidance.










share|improve this question





















  • 2





    It isn't telling you it cannot find the DLL. It is telling you 'can't find dependent libraries', which means another DLL that that DLL depends on.

    – user207421
    Mar 28 at 9:28











  • Oh Thanks. This actually helps. I added other dlls and it can load now. :)

    – Lieberta
    Mar 28 at 9:38

















0















I have the following code that is supposed to load two dlls:



public class ArcgisJniNet 
static
System.load("D:/Users/User/Desktop/DLL/comCorporateProject.dll");
System.load("D:/Users/User/Desktop/DLL/FileGDBAPI.dll");


//Native method declaration
private native void FileGDBApi();


public void test()
ArcgisJniNet arcgisJniNet = new ArcgisJniNet();
arcgisJniNet.FileGDBApi();




However, when I deploy in karaf and run the service call, it throws the following error:



Caused by: java.lang.UnsatisfiedLinkError: 
D:UsersUserDesktopDLLcomCorporateProject.dll: Can't find dependent
libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)[:1.8.0_162]
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)[:1.8.0_162]
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)[:1.8.0_162]
at java.lang.Runtime.load0(Runtime.java:809)[:1.8.0_162]
at java.lang.System.load(System.java:1086)[:1.8.0_162]
at com.corporate.ex.services.arcgis.service.ArcgisJniNet.<clinit>
(ArcgisJniNet.java:5)


I already set in environment variable to include the path to the dll folder and restarted my computer but seems like I am still faced with this issue.



My C++ implementation looks like this:



#include "stdafx.h"

#include "comCorporateProject.h"

#include <FileGDBAPI.h>
using namespace FileGDBAPI;
using namespace std;

JNIEXPORT void JNICALL
Java_com_corporate_ex_services_arcgis_service_ArcgisJniNet_FileGDBApi
(JNIEnv *, jobject)
fgdbError hr;
Geodatabase gdb;
if ((hr =
CreateGeodatabase(L"D:/Users/User/Desktop/geodb/example.gdb", gdb)) !=
S_OK)

wcout << "An error occurred while creating the geodatabase.";

wcout << "An error occurred while creating the geodatabase.";
CloseGeodatabase(gdb);



My intention is to invoke the c++ function from the java code jar that will be deployed in the server. I'm not sure why it is telling me it cannot find the dll when I have provided the right absolute path. Please point out the mistake I have made. Thanks for your guidance.










share|improve this question





















  • 2





    It isn't telling you it cannot find the DLL. It is telling you 'can't find dependent libraries', which means another DLL that that DLL depends on.

    – user207421
    Mar 28 at 9:28











  • Oh Thanks. This actually helps. I added other dlls and it can load now. :)

    – Lieberta
    Mar 28 at 9:38













0












0








0








I have the following code that is supposed to load two dlls:



public class ArcgisJniNet 
static
System.load("D:/Users/User/Desktop/DLL/comCorporateProject.dll");
System.load("D:/Users/User/Desktop/DLL/FileGDBAPI.dll");


//Native method declaration
private native void FileGDBApi();


public void test()
ArcgisJniNet arcgisJniNet = new ArcgisJniNet();
arcgisJniNet.FileGDBApi();




However, when I deploy in karaf and run the service call, it throws the following error:



Caused by: java.lang.UnsatisfiedLinkError: 
D:UsersUserDesktopDLLcomCorporateProject.dll: Can't find dependent
libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)[:1.8.0_162]
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)[:1.8.0_162]
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)[:1.8.0_162]
at java.lang.Runtime.load0(Runtime.java:809)[:1.8.0_162]
at java.lang.System.load(System.java:1086)[:1.8.0_162]
at com.corporate.ex.services.arcgis.service.ArcgisJniNet.<clinit>
(ArcgisJniNet.java:5)


I already set in environment variable to include the path to the dll folder and restarted my computer but seems like I am still faced with this issue.



My C++ implementation looks like this:



#include "stdafx.h"

#include "comCorporateProject.h"

#include <FileGDBAPI.h>
using namespace FileGDBAPI;
using namespace std;

JNIEXPORT void JNICALL
Java_com_corporate_ex_services_arcgis_service_ArcgisJniNet_FileGDBApi
(JNIEnv *, jobject)
fgdbError hr;
Geodatabase gdb;
if ((hr =
CreateGeodatabase(L"D:/Users/User/Desktop/geodb/example.gdb", gdb)) !=
S_OK)

wcout << "An error occurred while creating the geodatabase.";

wcout << "An error occurred while creating the geodatabase.";
CloseGeodatabase(gdb);



My intention is to invoke the c++ function from the java code jar that will be deployed in the server. I'm not sure why it is telling me it cannot find the dll when I have provided the right absolute path. Please point out the mistake I have made. Thanks for your guidance.










share|improve this question
















I have the following code that is supposed to load two dlls:



public class ArcgisJniNet 
static
System.load("D:/Users/User/Desktop/DLL/comCorporateProject.dll");
System.load("D:/Users/User/Desktop/DLL/FileGDBAPI.dll");


//Native method declaration
private native void FileGDBApi();


public void test()
ArcgisJniNet arcgisJniNet = new ArcgisJniNet();
arcgisJniNet.FileGDBApi();




However, when I deploy in karaf and run the service call, it throws the following error:



Caused by: java.lang.UnsatisfiedLinkError: 
D:UsersUserDesktopDLLcomCorporateProject.dll: Can't find dependent
libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)[:1.8.0_162]
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)[:1.8.0_162]
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)[:1.8.0_162]
at java.lang.Runtime.load0(Runtime.java:809)[:1.8.0_162]
at java.lang.System.load(System.java:1086)[:1.8.0_162]
at com.corporate.ex.services.arcgis.service.ArcgisJniNet.<clinit>
(ArcgisJniNet.java:5)


I already set in environment variable to include the path to the dll folder and restarted my computer but seems like I am still faced with this issue.



My C++ implementation looks like this:



#include "stdafx.h"

#include "comCorporateProject.h"

#include <FileGDBAPI.h>
using namespace FileGDBAPI;
using namespace std;

JNIEXPORT void JNICALL
Java_com_corporate_ex_services_arcgis_service_ArcgisJniNet_FileGDBApi
(JNIEnv *, jobject)
fgdbError hr;
Geodatabase gdb;
if ((hr =
CreateGeodatabase(L"D:/Users/User/Desktop/geodb/example.gdb", gdb)) !=
S_OK)

wcout << "An error occurred while creating the geodatabase.";

wcout << "An error occurred while creating the geodatabase.";
CloseGeodatabase(gdb);



My intention is to invoke the c++ function from the java code jar that will be deployed in the server. I'm not sure why it is telling me it cannot find the dll when I have provided the right absolute path. Please point out the mistake I have made. Thanks for your guidance.







java native






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 28 at 9:16







Lieberta

















asked Mar 28 at 8:59









LiebertaLieberta

6911 bronze badges




6911 bronze badges










  • 2





    It isn't telling you it cannot find the DLL. It is telling you 'can't find dependent libraries', which means another DLL that that DLL depends on.

    – user207421
    Mar 28 at 9:28











  • Oh Thanks. This actually helps. I added other dlls and it can load now. :)

    – Lieberta
    Mar 28 at 9:38












  • 2





    It isn't telling you it cannot find the DLL. It is telling you 'can't find dependent libraries', which means another DLL that that DLL depends on.

    – user207421
    Mar 28 at 9:28











  • Oh Thanks. This actually helps. I added other dlls and it can load now. :)

    – Lieberta
    Mar 28 at 9:38







2




2





It isn't telling you it cannot find the DLL. It is telling you 'can't find dependent libraries', which means another DLL that that DLL depends on.

– user207421
Mar 28 at 9:28





It isn't telling you it cannot find the DLL. It is telling you 'can't find dependent libraries', which means another DLL that that DLL depends on.

– user207421
Mar 28 at 9:28













Oh Thanks. This actually helps. I added other dlls and it can load now. :)

– Lieberta
Mar 28 at 9:38





Oh Thanks. This actually helps. I added other dlls and it can load now. :)

– Lieberta
Mar 28 at 9:38












0






active

oldest

votes










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);














draft saved

draft discarded
















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55393572%2fwhy-is-my-dll-not-loaded-in-this-java-code%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes




Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.




















draft saved

draft discarded















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55393572%2fwhy-is-my-dll-not-loaded-in-this-java-code%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript