簡體   English   中英

將DLL添加到Spring MVC項目

[英]Adding dll to spring mvc project

我有一個使用Eclipse Kepler的spring mvc項目,並且想要在該項目中使用.net dll。

我按照此信息完成了為Java准備dll的過程

在我的

spring project -> Properties -> Java Class Path -> libraries -> External Jar -> Located my jar used to call the c# methods.

接下來添加本機庫

spring project -> Properties -> Java Class Path -> libraries -> Located external jar added -> expand -> highlight Native Library Locaton -> path to where my dll's are located

在我的春季mvc項目代碼中,我可以在外部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

我猜這篇文章准確地描述了您要尋找的內容:

http://java.dzone.com/articles/building-java-applications-use

它逐步顯示了構建Sprint MVC應用程序的逐步指南,該應用程序利用了直接從JAVA使用的.NET DLL。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM