将我的静态程序分析器的演示创建为 Web 应用程序?[不向客户端发送 .jar 文件] [英] Create a demo of my static program analyzer as a web application? [without sending .jar files to clients]
问题描述
我一直在开发一个静态程序分析器(一种试图在编译时检测程序错误的工具),它几乎完成了.我想在网上发布一个演示版本,以便可能对该工具感兴趣的少数人可以测试其功能.
I have been developing a static program analyzer (a kind of tool that attempts to detect program errors at compile-time), and it is almost finished. I would like to put a demo version to the web so that the few people who may be interested into the tool can test out its functionalities.
上下文:1. 如有需要,我有一台个人电脑用作服务器.否则,我不确定在技术上是否可以将演示放到我研究所的计算机上,因为他们的计算机没有用于启动演示所需的库.
Context: 1. I have a personal computer to be used as a server if necessary. Otherwise, I am not sure if it is technically possible to put the demo to the computers of my institute because their computers do not have the required library used to launch the demo.
我正在使用 Eclipse 和 Maven 来开发这个分析器.分析器是用 Java 编写的.
I am using Eclipse and Maven to develop this analyzer. The analyzer is written in Java.
分析器有点费时.例如,完成一项有趣的工作需要 5 秒和 500 Mo JVM 虚拟内存.所以我需要限制访问者的数量.
The analyzer is somewhat time-consuming. It takes, for example, 5 seconds and 500 Mo JVM virtual memory to do an interesting work. So I need to limit the number of accessors.
我不打算将 .jar 文件发送给客户,因为我不知道他们会是谁.
I do not plan to send the .jar files to the clients, because I don't know who they will be.
我对 Web 应用程序一无所知.
I know nothing about the web application.
在这种情况下,您认为在网络上展示我的分析器的最简单方法是什么?
Under this context, what is, in your opinion, the easiest way to demonstrate my analyzer on the web?
这可能与大多数关于如何将桌面程序转换为 Java Web 应用程序的问题不同,例如 这个
This may be a different question from most questions about how to convert a desktop program to a Java web application, such as this
谢谢.
[已编辑] 如果要考虑上述约束条件 3,最佳解决方案是什么?
What would be the best solution if the constraint 3 above is to be taken into account?
推荐答案
您可能正在寻找 Java Web Start,流行分析器使用的部署选项,FindBugs
.这个示例说明了几个关键概念并利用了最低成本的托管.
You may be looking for Java Web Start, a deployment option used by the popular analyzer, FindBugs
. This example illustrates few key concepts and leverages minimal-cost hosting.
附录:@Capn Sparrow 对 Java Web Start 将程序的 JAR 副本从服务器下载到客户端的评论很有帮助,这违反了问题中的要求 3.这需要进行多项风险/收益权衡:
Addendum: @Capn Sparrow helpfully comments that Java Web Start downloads copies of the program's JARs from the server to the client, violating requirement three in the question. This entails several risk/benefit tradeoffs:
Pro:服务器可以轻松更新,以确保客户端始终拥有最新版本.JAR 缓存在客户端上,从而最大限度地减少更新延迟.
Pro: The server can be easily updated to ensure that the client always has the latest version. JARs are cached on the client, minimizing latency on update.
缺点:缓存的 JAR 可能会被反编译或篡改.用户必须接受选择的任何
设置或拒绝应用程序.使用 jarsigner
可以降低一些风险.
Con: The cached JARs may be decompiled or tampered with. The user must accept whatever <security>
setting is chosen or reject the application. Using jarsigner
can mitigate some risks.
这篇关于将我的静态程序分析器的演示创建为 Web 应用程序?[不向客户端发送 .jar 文件]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!