Java 向SpringMVC项目添加dll
我有一个使用EclipseKepler的SpringMVC项目,希望在该项目中使用.NETDLL 我经历了为java准备dll的过程 在我的Java 向SpringMVC项目添加dll,java,eclipse,spring-mvc,java-7,m2eclipse,Java,Eclipse,Spring Mvc,Java 7,M2eclipse,我有一个使用EclipseKepler的SpringMVC项目,希望在该项目中使用.NETDLL 我经历了为java准备dll的过程 在我的 spring project -> Properties -> Java Class Path -> libraries -> External Jar -> Located my jar used to call the c# methods. 接下来添加了本机libs spring project -> Prope
spring project -> Properties -> Java Class Path -> libraries -> External Jar -> Located my jar used to call the c# methods.
接下来添加了本机libs
spring project -> Properties -> Java Class Path -> libraries -> Located external jar added -> expand -> highlight Native Library Locaton -> path to where my dll's are located
在SpringMVC项目代码中,我可以在外部jar文件中创建对象的实例
MyJavaCallingComObject testObj = new MyJavaCallingComObject ();
testObj.GetDetails("John Doe");
GetDetails = supposed to return user information given the user name
然而,当我去调用一个方法时,我遇到了
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (os_windows_x86.cpp:143), pid=8644, tid=10476
# guarantee(result == EXCEPTION_CONTINUE_EXECUTION) failed: Unexpected result from topLevelExceptionFilter
#
# JRE version: Java(TM) SE Runtime Environment (7.0_51-b13) (build 1.7.0_51-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.51-b03 mixed mode windows-amd64 compressed oops)
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
我的Eclipse位于c:\Eclipse
我所有的工作空间都位于
d:\workspaces
我想这篇文章描述的正是您想要的:
它展示了构建Sprint MVC应用程序的分步指南,该应用程序利用直接从JAVA使用的.NET DLL