Click here to Skip to main content
15,913,610 members
Home / Discussions / Java
   

Java

 
AnswerRe: I have designed two html pages how to connect them in Java ? Pin
Michaelabner9-Jan-17 1:15
Michaelabner9-Jan-17 1:15 
QuestionCLARIFY Pin
Sruthi Priya 20-Dec-16 23:47
Sruthi Priya 20-Dec-16 23:47 
AnswerRe: CLARIFY Pin
Peter Leow20-Dec-16 23:53
professionalPeter Leow20-Dec-16 23:53 
QuestionCannot Add CheckBox to Frame in AWT Pin
Dev Gupta from Mumbai,India20-Dec-16 20:19
Dev Gupta from Mumbai,India20-Dec-16 20:19 
AnswerRe: Cannot Add CheckBox to Frame in AWT Pin
Richard MacCutchan21-Dec-16 0:32
mveRichard MacCutchan21-Dec-16 0:32 
QuestionJAVA Pin
Member 1291150018-Dec-16 22:00
Member 1291150018-Dec-16 22:00 
AnswerRe: JAVA Pin
Richard Deeming19-Dec-16 2:24
mveRichard Deeming19-Dec-16 2:24 
GeneralRe: JAVA Pin
Mycroft Holmes19-Dec-16 12:01
professionalMycroft Holmes19-Dec-16 12:01 
QuestionHow do I create sections in my file and get the section's value? Pin
NickTheDev3-Dec-16 17:16
NickTheDev3-Dec-16 17:16 
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 

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.