1

I have some native files. I need to load those into my project. How can I do so in Netbeans?

I'm loading them with:

System.loadLibrary("SBXPCJavaProxy");
nanofarad
  • 40,330
  • 4
  • 86
  • 117
user3475175
  • 83
  • 2
  • 10
  • 1
    I've reformatted your post, please pay more attention to formatting, grammar, and readability next time, so users can quickly read your post and answer. (It took me three reads to actually understand exactly what was being said) – nanofarad May 02 '14 at 11:32
  • @hexafraction k could u please help me out.How to add native project libraries to the our project. – user3475175 May 02 '14 at 11:37
  • @hexafraction How to add native project libraries to the my current project – user3475175 May 02 '14 at 11:45
  • @hexafraction ya i have added like this in vm options: -Djava.library.path="C:\Users\admin\Desktop\SBXPC_CORE_130330ú¿sdkú¬\SBXPCJavaProxy.dll". but still i am getting same error – user3475175 May 02 '14 at 12:18
  • @hexafraction I tried its not working could u explain me where is problem i gave like -Djava.library.path="D:\bioproject\SBXPCJavaProxy.dll" my .dll file is in D:drive. – user3475175 May 02 '14 at 12:38
  • @hexafraction I tried its not working could u explain me where is problem i gave like -Djava.library.path="D:\bioproject\SBXPCJavaProxy.dll" my .dll file is in D:drive – user3475175 May 02 '14 at 12:57
  • Please do not address me with multiple comments. I've fixed your post. If I had known an answer, I *would have posted it*. Asking me does not help. – nanofarad May 02 '14 at 16:45

1 Answers1

2

This is pretty forward in Netbeans:

  • Right click on the Project.
  • Select Properties.
  • Click on RUN.
  • In VM Options TYPE -Djava.library.path="[dir]".
  • Press Ok.

Basically you give directions to the compiler in which folders to search for available packages.

Note that [dir] should be an absolute path to the folder containing your natives. For example, if your natives are in C:\Natives then [dir] should be C:\Natives.

Anubian Noob
  • 13,426
  • 6
  • 53
  • 75
MaVRoSCy
  • 17,747
  • 15
  • 82
  • 125