简体   繁体   English

如何使用NetBeans中的LTI CIVIL(DLL文件)运行嵌入HTML页面中的applet

[英]How to run an applet embedded in a HTML page using LTI CIVIL (DLL files) in NetBeans

I'm developing an app in NetBeans 7.4 which uses Lti-Civil DLL files for opening my webCam, I have to add to my project next parameter: 我正在NetBeans 7.4中开发一个应用程序,该应用程序使用Lti-Civil DLL文件打开我的网络摄像头,我必须在项目中添加下一个参数:

Properties -> Run -> VM Options: -> -Djava.library.path="lib/win32-x86" -Djava.security.policy=applet.policy 属性->运行-> VM选项:-> -Djava.library.path =“ lib / win32-x86” -Djava.security.policy = applet.policy


lib/win32-x86 = directory within my project which stores Lti-Civil DLL files If I want to make the JAR file Running I do the following in terminal: lib / win32-x86 =我的项目中存储Lti-Civil DLL文件的目录如果要运行JAR文件,请在终端中执行以下操作:

java -Djava.library.path="C:\Users\myUser\Documents\NetBeansProjects\CapturaCamaraWeb2\lib\win32-x86" -Djava.security.policy=applet.policy -jar C:\Users\myUser\Documents\NetBeansProjects\CapturaCamaraWeb2\dist\CapturaCamaraWeb2.jar
  • I have to build this in a working applet (done) 我必须在一个工作的小程序中构建它(完成)
  • build a HTML File and embed the Applet (done) 构建一个HTML文件并嵌入Applet(完成)
  • Make the applet work inside HTML file (not done yet) 使applet在HTML文件中工作(尚未完成)

Applet 小程序

在此处输入图片说明


Web Applet error message on load 加载Web Applet错误消息

在此处输入图片说明


Web Applet: 网络小程序:

在此处输入图片说明


Java Console Java控制台

在此处输入图片说明


EDIT: as far as I see this error message refers to this class 编辑:据我所见,此错误消息是指此类 在此处输入图片说明

Add the libraries directly to your projects' libraries/dependencies. 将库直接添加到项目的库/依赖项中。

In Netbeans, right-click on Libraries and select Add Jar/Folder to add the dependent libraries. 在Netbeans中,右键单击“库”,然后选择“ Add Jar/Folder以添加从属库。

Once this is done, you don't have to manually specify the path while running again. 完成此操作后,您无需在再次运行时手动指定路径。

In order to build the project, right-click on the project and select "Clean & Build" - it'll create a dist directory containing the build output files along with all dependencies within a lib folder. 为了构建项目,右键单击该项目并选择“ Clean&Build”-它会创建一个dist目录,其中包含构建输出文件以及lib文件夹中的所有依赖项。

If you want all dependencies to go directly into your jar, you can use Netbeans package-for-store option in Run Target under build.xml 如果希望所有依赖项都直接放入jar中,则可以在build.xml下的Run Target使用Netbeans package-for-store选项。

Right-click on the build.xml in the Files pane. 右键单击“文件”窗格中的build.xml。 (Windows menu -> Files to see the Files pane) (Windows菜单->“文件”以查看“文件”窗格)

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM