浏览器中的Java Applet策略问题 [英] Java Applet policy problem in browser

查看:80
本文介绍了浏览器中的Java Applet策略问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我需要解决以下3个问题:

1.对于我的项目,我正在为毕业生和员工构建一个在线招聘系统.由于我只熟悉C/C ++和Java,因此我在Netbeans中选择了Java.我建立了一个applet,并使用run file命令对其进行编译.它从一个文本文件中获取了现有数据,而当我从Netbeans中运行它时,我工作得很好.这必须在Web上可用,所以我认为我会将applet嵌入到html文件中.一旦我尝试执行此操作,它就会开始给我java.io.FilePermission(读取)错误!所以我尝试使用策略工具,当我使用命令提示符和记事本时,我早先使用了策略工具,但是现在使用netbeans,这是第一次尝试,但我还无法弄清楚.它仍然给我一个文件读取错误.但是奇怪的是,当我通过netbeans运行它时没有错误.我应该编辑哪个java.policy文件?是项目文件夹中的一个还是用户目录中的一个?

2.有什么方法可以使内置在netbeans中的applet/JFrame变得可辨别吗?那是在计算机上,我可以只加载一些文件并运行它.因为加载jar文件很麻烦.您必须安装jdk才能运行它.像新手一样,我们不能只将他们的项目放在rar文件中,他们就可以解压缩并开始部署它吗?

3.是否有比仅从文件中读取更好的方法?就像我必须将其分发一样,是否需要在每台计算机上设置策略条目?使用JDBC/ODBC是否也需要在策略中授予权限.如果有比文本文件更好的方法,请告诉我!

任何帮助将不胜感激!

谢谢

Hi everybody I need help in the following 3 issues:

1. For my project, I am building an online recruiting system for graduates and employees. Since I am familiar with C/C++ and Java only, I chose Java in Netbeans. I built an applet and i used to compile it using the run file command. It took the existing data from a text file and i worked fine when i ran it from Netbeans. This has to be available on the web, so i thought i''ll embed the applet in a html file. Once i tried to do that it started giving me the java.io.FilePermission (read) error! So i tried using the policy tool, i had used the policy tool earlier when i used command prompt and notepad but now with netbeans it was the first try and i haven''t been able to figure it out yet. It is still giving me a file read error. But the strange part is that there is no error when i run it through netbeans. What java.policy file should i edit? the one in the project folder or the one in the user directory?

2. Is there any way to make an applet/JFrame built in netbeans disributable? That is on a computer i can just load some files and run it. Because loading a jar file is messy. You have to install jdk to run that. Like for noobs, can''t we just give them the project in a rar file and they can just unzip it and start deploying it?

3. Is there a better way then simply reading from files? Like if i have to make it distributable, will i have to set the policy entries in each computer? Does using JDBC/ODBC also require granting permissions in the policy. And if there is a better way than just text files, please do tell me!

Any help would be grateful!

Thanks

推荐答案

我建​​议您使用闪耀"企业模式

它具有Jshooter,您可以将其用于分发
我有一个util软件包,其中有很多类可以完成所有工作
用于处理文件,浏览和...

它还具有jconnection,使使用jdbc和hibernate更加容易

您可以在这里下载它的库和文档:
http://SourceForge.net/projects/shine-enterpris/files/ [
I suggest you to work with shine enterprise pattern

it has Jshooter you can use it for distribution
i has a util package that has lots of class for doing all job u thing
for working with file ,browsing and ...

also it has jconnection that makes working with jdbc and hibernate more easy

u can download it''s library and document here :
http://SourceForge.net/projects/shine-enterpris/files/[^]


这篇关于浏览器中的Java Applet策略问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆