如何为 Java Web 应用程序创建 JNLP 文件?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4261065/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-14 15:07:29  来源:igfitidea点击:

How to create JNLP file for a java web application?

javajnlp

提问by razshan

I have a java program that I ultimately want to deploy it on the web.

我有一个 Java 程序,我最终想将它部署在网络上。

I started off creating a jar file from bunch of classes:

我开始从一堆类创建一个 jar 文件:

jar cfe tbi.jar trail1modified trail1modified.class InitialKeypad.class InitialKeypad$1.class InitialKeypad$2.class InitialKeypad$thehandler.class InitialKeypad$thehandler2.class InitialKeypad$thehandler3.class InitialKeypad$thehandler4.class Keypad5$1.class Keypad5$thehandler.class Keypad5$thehandler2.class Keypad5$thehandler3.class Keypad5.class Keypad6$1.class Keypad6$thehandler.class Keypad6$thehandler2.class Keypad6$thehandler3.class Keypad6.class Keypad7$1.class Keypad7$thehandler.class Keypad7$thehandler2.class Keypad7$thehandler3.class Keypad7.class Keypad8$1.class Keypad8$thehandler.class Keypad8$thehandler2.class Keypad8$thehandler3.class Keypad8.class Keypad9$1.class Keypad9$thehandler.class Keypad9$thehandler2.class Keypad9$thehandler3.class Keypad9.class Keypad10$1.class Keypad10$thehandler.class Keypad10$thehandler2.class Keypad10$thehandler3.class Keypad10.class Keypad11$1.class Keypad11$thehandler.class Keypad11$thehandler2.class Keypad11$thehandler3.class Keypad11.class Keypad12$1.class Keypad12$thehandler.class Keypad12$thehandler2.class Keypad12$thehandler3.class Keypad12.class Keypad13$1.class Keypad13$thehandler.class Keypad13$thehandler2.class Keypad13$thehandler3.class Keypad13$thehandler4.class Keypad13.class Keypad14$1.class Keypad14$thehandler.class Keypad14$thehandler2.class Keypad14$thehandler3.class Keypad14$thehandler4.class Keypad14.class ReKeypad.class ReKeypad$1.class ReKeypad$2.class ReKeypad$thehandler.class ReKeypad$thehandler2.class ReKeypad$thehandler3.class ReKeypad$thehandler4.class time.class time2.class trail2$1.class trail2$2.class trail2.class UO$1.class UO$2.class UO$thehandler.class UO$thehandler2.class UO$thehandler3.class UO.class

jar cfe tbi.jar trail1modified trail1modified.class InitialKeypad.class InitialKeypad$1.class InitialKeypad$2.class InitialKeypad$thehandler.class InitialKeypad$thehandler2.class InitialKeypad$thehandler3.class InitialKeypad$thehandler4.class Keypad5$1.class Keypad5$thehandler.class Keypad5 $thehandler2.class Keypad5$thehandler3.class Keypad5.class Keypad6$1.class Keypad6$thehandler.class Keypad6$thehandler2.class Keypad6$thehandler3.class Keypad6.class Keypad7$1.class Keypad7$thehandler.class Keypad7$thehandler2.class Keypad7$ thehandler3.class Keypad7.class Keypad8$1.class Keypad8$thehandler.class Keypad8$thehandler2.class Keypad8$thehandler3.class Keypad8.class Keypad9$1.class Keypad9$thehandler.class Keypad9$thehandler2.class Keypad9$thehandler3.class Keypad9.class键盘10$1。class Keypad10$thehandler.class Keypad10$thehandler2.class Keypad10$thehandler3.class Keypad10.class Keypad11$1.class Keypad11$thehandler.class Keypad11$thehandler2.class Keypad11$thehandler3.class Keypad11.class Keypad12$1.class Keypad.class Keypad12$1.class Keypad12 Keypad12$thehandler2.class Keypad12$thehandler3.class Keypad12.class Keypad13$1.class Keypad13$thehandler.class Keypad13$thehandler2.class Keypad13$thehandler3.class Keypad13$thehandler4.class Keypad13.class Keypad14$1.class Keypad14$1.class Keypad14 $thehandler2.class Keypad14$thehandler3.class Keypad14$thehandler4.class Keypad14.class ReKeypad.class ReKeypad$1.class ReKeypad$2.class ReKeypad$thehandler.class ReKeypad$thehandler2.class ReKeypad$thehandler3.class ReKeypad$thehandler4.class 时间。上课时间2.上课轨迹2$1。class trail2$2.class trail2.class UO$1.class UO$2.class UO$thehandler.class UO$thehandler2.class UO$thehandler3.class UO.class

Now I wish to create a JNLP file. I am following this http://download.oracle.com/javase/tutorial/deployment/webstart/deploying.html

现在我想创建一个 JNLP 文件。我正在关注这个http://download.oracle.com/javase/tutorial/deployment/webstart/deploying.html

I am bit lost on the JNLP part. How do I create it? And what does it signifies? Are there any tutoring videos on (for example) creating a simple Hello World program --> jar file --> JNLP file --> HTML stage --> java web application.

我对 JNLP 部分有点迷茫。我如何创建它?它意味着什么?是否有任何关于(例如)创建简单 Hello World 程序 --> jar 文件 --> JNLP 文件 --> HTML 阶段 --> java web 应用程序的辅导视频。

回答by Hyman

Take a look here, still from Oracle, but definitely better!

看看这里,仍然来自 Oracle,但绝对更好!

Specific topic about JNLP syntax: http://download.oracle.com/javase/6/docs/technotes/guides/javaws/developersguide/syntax.html#example

关于 JNLP 语法的特定主题:http: //download.oracle.com/javase/6/docs/technotes/guides/javaws/developersguide/syntax.html#example

回答by AlexR

And take a minute, pack your classes into jar. It is much more convenient!

花点时间,将您的课程打包到 jar 中。方便多了!

回答by Ram Dutt Shukla

A brief Description:

简要说明:

Java Web Start is a mechanism for program delivery through a standard Web server. Typically initiated through the browser, these programs are deployed to the client and executed outside the scope of the browser. Once deployed, the programs do not need to be downloaded again, and they can automatically download updates on startup without requiring the user to go through the whole installation process again

Java Web Start is a mechanism for program delivery through a standard Web server. Typically initiated through the browser, these programs are deployed to the client and executed outside the scope of the browser. Once deployed, the programs do not need to be downloaded again, and they can automatically download updates on startup without requiring the user to go through the whole installation process again

Look at this. This includes the simplest and comapct steps to create a jnlp file.

看看这个。这包括创建 jnlp 文件的最简单和 comapct 步骤。