How are Java applications deployed in the “real world”?

后端 未结 4 2065
眼角桃花
眼角桃花 2021-02-01 08:12

As a novice to the world of Java programming, this question has always boggled my mind. I first believed that all Java files were compacted into applets and then ra

4条回答
  •  执笔经年
    2021-02-01 08:34

    If the application is mean to run on a client, it is packaged as an executable JAR, then further packaged as an Application Bundle (Mac), maybe wrapped in an exe (Windows), or paired with an executable script that will launch the JAR and set any required VM arguments.

    If it is part of a web application, then it will be packaged as a WAR or EAR and placed into the appropriate location on the web server.

    If it is simply a library, then it is usually packaged as a JAR (non-executable) and distributed as such for integration into larger projects.

    applets and then ran, but I soon realized that this isn't always the case

    Actually, applets are rare nowadays and their use is discouraged.

提交回复
热议问题