How do I deploy my java application onto a website?

三世轮回 提交于 2020-02-07 09:28:22

问题


I just complied all my java programs, which consists of 4 classes and everything's working fine. I have the GUI, client, server, and the action listeners and an image all in the same folder. I just don't know how to put my local java application that I debugged and tested in JGrasp software onto my webpage. I looked around and I read you need to make a jar file and compress all of them, but I don't know how to do that, neither creating an applet. I tried the most simple way of doing it by attempting to convert the .java file "SMTPServer", the class used to run the application, and convert that into a JNLP file and it brought up a Java WebStart Application, but was unable to run it. This is my first time trying to port it to the webpage. How do I do this?


回答1:


This basic example is a hybrid. The JAR contains a single class. The JAR can be deployed as either an applet or application. You can build a JAR containing your compiled class files in JGrasp as shown here.

<resources>
    <j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se"/>
    <jar href="YourApplication.jar"/>
</resources>


来源:https://stackoverflow.com/questions/19214798/how-do-i-deploy-my-java-application-onto-a-website

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!