Click here to Skip to main content
15,887,596 members
Home / Discussions / Java
   

Java

 
AnswerRe: How do I create sections in my file and get the section's value? Pin
Richard MacCutchan3-Dec-16 20:59
mveRichard MacCutchan3-Dec-16 20:59 
GeneralRe: How do I create sections in my file and get the section's value? Pin
NickTheDev4-Dec-16 6:21
NickTheDev4-Dec-16 6:21 
GeneralRe: How do I create sections in my file and get the section's value? Pin
Richard MacCutchan4-Dec-16 6:50
mveRichard MacCutchan4-Dec-16 6:50 
GeneralRe: How do I create sections in my file and get the section's value? Pin
NickTheDev4-Dec-16 7:22
NickTheDev4-Dec-16 7:22 
GeneralRe: How do I create sections in my file and get the section's value? Pin
Richard MacCutchan4-Dec-16 21:13
mveRichard MacCutchan4-Dec-16 21:13 
QuestionRegarding this article "XSS vulnarability detection tool for JSP". Pin
Member 121360961-Dec-16 0:57
Member 121360961-Dec-16 0:57 
AnswerRe: Regarding this article "XSS vulnarability detection tool for JSP". Pin
Richard MacCutchan1-Dec-16 1:04
mveRichard MacCutchan1-Dec-16 1:04 
QuestionHow to Call C++ dll in java Pin
shanmugarajaa25-Nov-16 21:16
shanmugarajaa25-Nov-16 21:16 
Dear Friend,
I build the dll(Maths) in visual studio 2013 win32.

Hide Copy Code
#include "stdafx.h"
#include <stdio.h>


extern "C"
{
__declspec(dllexport) int Add(int x, int y)
{
return x+y;
}
}

and tried to call this dll in java using JNA library.

Hide Copy Code
import com.sun.jna.Native;
import libs.IMathFunc;
public class MathFuc {

public static void main(String[] args) {
// TODO Auto-generated method stub




IMathFunc mathfunc = (IMathFunc)Native.loadLibrary("Maths", IMathFunc.class);
int addition = mathfunc.Add(5, 5);
System.out.print(Integer.toString(addition));
}

}

But I dont knwon where I am making mistake

Can anyone refer me an atricle or sample application on this issue.
Please kindly help me on this issue.

Thanks,
S Shanmuga Raja

What I have tried:

I have used JNA library. But it throwing error like:

Hide Copy Code
Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library 'Maths': JNA native support (win32-amd64/Maths.dll) not found in resource path (E:\Maths\Demo\bin;C:\Program Files\JAVA\jna-3.5.2.jar\jna-3.5.2.jar;E:\MathsDemo\x64\Debug;C:\Program Files\JAVA\jdk1.8.0_71\include\win32)
at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:220)
at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:322)
at com.sun.jna.Library$Handler.<init>(Library.java:142)
at com.sun.jna.Native.loadLibrary(Native.java:387)
at com.sun.jna.Native.loadLibrary(Native.java:366)
at MathFuc.main(MathFuc.java:13)
AnswerRe: How to Call C++ dll in java Pin
Richard MacCutchan25-Nov-16 21:41
mveRichard MacCutchan25-Nov-16 21:41 
GeneralRe: How to Call C++ dll in java Pin
shanmugarajaa25-Nov-16 22:57
shanmugarajaa25-Nov-16 22:57 
GeneralRe: How to Call C++ dll in java Pin
Richard MacCutchan25-Nov-16 23:03
mveRichard MacCutchan25-Nov-16 23:03 
Questionjava problem Pin
Member 1283286519-Nov-16 7:26
Member 1283286519-Nov-16 7:26 
AnswerRe: java problem Pin
Richard MacCutchan19-Nov-16 12:04
mveRichard MacCutchan19-Nov-16 12:04 
Questionhow to do this string problem? Pin
Jebastin koilraj16-Nov-16 21:32
Jebastin koilraj16-Nov-16 21:32 
QuestionRe: how to do this string problem? Pin
Richard MacCutchan16-Nov-16 22:16
mveRichard MacCutchan16-Nov-16 22:16 
AnswerRe: how to do this string problem? Pin
Jebastin koilraj16-Nov-16 23:44
Jebastin koilraj16-Nov-16 23:44 
GeneralRe: how to do this string problem? Pin
NotPolitcallyCorrect17-Nov-16 0:59
NotPolitcallyCorrect17-Nov-16 0:59 
AnswerRe: how to do this string problem? Pin
ZurdoDev17-Nov-16 1:13
professionalZurdoDev17-Nov-16 1:13 
GeneralRe: how to do this string problem? Pin
Jebastin koilraj17-Nov-16 3:28
Jebastin koilraj17-Nov-16 3:28 
QuestionHow to implement FTP in given chat application? Pin
Member 1281417416-Nov-16 8:31
Member 1281417416-Nov-16 8:31 
AnswerRe: How to implement FTP in given chat application? Pin
NotPolitcallyCorrect16-Nov-16 9:43
NotPolitcallyCorrect16-Nov-16 9:43 
GeneralRe: How to implement FTP in given chat application? Pin
Member 1281417416-Nov-16 9:47
Member 1281417416-Nov-16 9:47 
GeneralRe: How to implement FTP in given chat application? Pin
NotPolitcallyCorrect16-Nov-16 9:56
NotPolitcallyCorrect16-Nov-16 9:56 
AnswerRe: How to implement FTP in given chat application? Pin
Richard MacCutchan16-Nov-16 22:24
mveRichard MacCutchan16-Nov-16 22:24 
QuestionEvent Handling, bt1.addActionListener(this); here "this" is refer to what ?? Pin
Member 127857914-Nov-16 5:54
Member 127857914-Nov-16 5:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.