After added the great feature of Java Module that can run custom JRE for specific application developed and Jakarta for develop the web application or enterprise application which can run Jakarta 9 , I can't understanding method to create web application with java! the question is if I need java 11(or 8) to create web application and Jakarta 9 do I need the Custom JRE that create with module ?
No, it is no required. Actually, the spec is silent in the way or application is deployed.
Currently, there is no more concept of JRE, using newer JDKs, only JLinked images, where you can select only the modules you need.
For now, only Java 8 is supported officially, with support for Java 11 coming shortly.
The specification doesn't mention anything about the Java module system. However, if you want to use modules, you could that a look at the Piranha Cloud project.
https://piranha.cloud
[Disclaimer: Piranha Cloud developer here]
Related
My application is developed in java Swings which is 20 years old. For this huge application we are migrating the same on JAVA 10 now and will migrate the same on java 11 or upcoming versions. This application is working fine with java Webstart and as per the java 11 features, java Web Start application will not be supported in java 11 and other coming versions.
Please let me know the best way to run my application on java 10 with out webstart.
There is OpenWebStart start project. It says:
we decided to create OpenWebStart, an open source reimplementation of
the Java Web Start technology. Our replacement will provide the most
commonly used features of Java Web Start and the JNLP standard, so
that your customers can continue using applications based on Java Web
Start and JNLP without any change.
At the moment the project is alpha phase. Download is available. Beta should be available by the end of the year:
Our goal is to have beta tests and a release candidate ready in
Q3/2019
One solution might be the WebStart replacement that Karakun is currently working on: https://dev.karakun.com/webstart/
Currently it is not clear when and how this will come since it is based on a kind of crowd-founding but since everyone can get involved (even with low cost) this is a very good possibility.
Since this is a duplicate of Applet/JNLP on Java 11 migration I just copied my answer
Use Getdown which is a system for deploying Java applications to end-user computers, as well as keeping those applications up to date.
It was designed as a replacement for Java Web Start due to limitations in Java Web Start's.
You can read more on https://github.com/threerings/getdown
You will have to find an alternative technology to JWS/JNLP to run your system, as JWS/JNLP will no longer be available.
I don't have a clear cut alternative, the few companies still using JWS tend to be working to develop their own replacements for internal use.
I know this may not be what you want to hear (that there is no out of the box replacement available) but that's the way it is. Project I'm working on is in a similar conundrum, we also have several JWS components that will need to be reworked in the near future.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I have done some research on JavaFX over the last year, and even built some basic desktop apps with it.
It's described as being used to create RIAs (Rich Internet Application).
http://en.wikipedia.org/wiki/Javafx
But can it really be deployed by a web browser? I have only deployed it via an executable JAR file.
How easy is it to deploy via web browser? Does it work? Does anyone have experience with this?
http://docs.oracle.com/javafx/2/deployment/deployment_toolkit.htm
Update for the March 2018 Java Client Roadmap
I encourage readers interested in this question to review the following Oracle Whitepaper:
Java Client Roadmap Update
The above paper outlines the official Oracle position on related technologies (JavaFX/Swing/AWT/Applets/WebStart), the dates until which it intends to support those technologies and which of those technologies it intends to transition to open source development projects separate from the JDK and JRE.
Update for Java 9, Oct 2017
According to the Java 9 release notes:
Java Applet and WebStart functionality, including the Applet API, The Java plug-in, the Java Applet Viewer, JNLP and Java Web Start including the javaws tool are all deprecated in JDK 9 and will be removed in a future release.
So, for Java 9+, deployment of JavaFX in a browser using a Java plug-in will only be possible using deprecated technology. Oracle notes in another part of the Java 9 release notes:
Deprecates the Java Plug-in and associated applet technologies in Oracle's JDK 9 builds. While still available in JDK 9, these technologies will be considered for removal from the Oracle JDK and JRE in a future release. Applets and JavaFX applications embedded in a web page require the Java Plug-in to run. Consider rewriting these types of applications as Java Web Start or self-contained applications.
Note: Java Web Start isn't really an alternative as that is also deprecated (anyway, it's different from an application embedded and rendered within a browser page). Also note for those who wish to use Web Start, even though it has now been removed from Oracle JDK 11+, it is available as open source, info on this is at OpenWebStart.
As an alternative which offers similar functionality, consider something like jpro, which deploys JavaFX applications in a browser without a Java plugin (jpro is currently only in closed beta, so it is not a viable solution as of October 2017, but maybe someday in the future...).
For now, I would recommend that the best way to deploy JavaFX applications is as self-contained applications, running outside a browser.
Previous answer for Java 7 and 8
JavaFx - can it really be deployed in a browser?
Yes, JavaFX applications can be deployed so that they run inside a web browser hosted html web page.
The technology which allows this to occur is the Java Plugin. This plugin is currently a NPAPI based browser plugin solution. The Java Plugin is shipped with the Oracle Java 7 Runtime Standard Environment.
Not all browsers are supported, only those listed on the JavaFX Supported Configurations page.
How easy is it to deploy via web browser?
The easiest way to deploy a JavaFX project in a web browser is:
Create a new JavaFX project in NetBeans.
Develop a simple HelloWorld App.
Follow the instructions for Deploying your first JavaFX Application.
This is not difficult (in my opinion).
Alternatively, follow instructions on the detailed reference for Deploying JavaFX Applications (or use 3rd party tools). For many projects, using a tool other than the NetBeans IDE to perform packaging is a better approach. However, it is generally easier to let the NetBeans IDE handle deployment packaging tasks for you.
What follows is not related to answering the original question, but provides some opinions and information requested in comments on this answer.
Some Advice
There are pitfalls to deploying Java in a browser. I encourage you to do your own Google research on the subject.
In my mind, based upon the current JavaFX 2.x deployment model, for most application types that require a browser as the primary runtime container, using JavaFX is not an appropriate solution.
Examine the deployment and runtime requirements for your application. Based on your requirements, and knowledge of the JavaFX browser based execution model, decide if a browser based deployment using JavaFX technology is the correct mechanism for your application.
A couple of potential difficulties for browser embedded JavaFX applications
Some important browsers (e.g. Internet Explorer 10, iOS Safari and soon Desktop Chrome) don't permit execution of plugins using the NPAPI currently used by the Java browser plugin => some of your target users may be unable to use your application.
With a browser embedded application, you don't have complete control over the runtime on which your application executes (browser + Java runtime + plugin interface) => an application which was working when first installed may stop functioning as expected after an update to these runtime components.
Deployment Alternatives
If a browser based deployment model is not appropriate for your application, there are other ways to deploy JavaFX applications (e.g. WebStart, stand-alone jars and self-contained applications).
JavaFX - can it really be deployed in a browser?
No, not any more.
The answer used to be yes, as given in this answer, although even in 2013 when that was written the writing was on the wall. However, here in 2016 the answer is no, it cannot. Modern browsers essentially don't support NPAPI any longer (Firefox does for Java, but only until the end of the year), and NPAPI is required for the Java plugin.
As of 2016 you can use jpro without any browser plugin. And it even runs on mobiles.
Edit 1: The project is free for non-commercial or open source projects. A "hello world" can be found here
I found solution by chance here.
what was missing in my web project.
I must add this to web.xml file :
<mime-mapping>
<extension>jnlp</extension>
<mime-type>application/x-java-jnlp-file</mime-type>
</mime-mapping>
This question already has answers here:
Difference between Java SE/EE/ME?
(14 answers)
Closed 6 years ago.
I am confused about java platforms.From the page Differences between Java EE and Java SE , java has four platforms. Has there any special things between them ? Are they use different JDKs or JREs ?
For clear my question , when I download JDK , I think I can create not only java desktop applications (with swing or javafx) but also web applications.If so ,why java says it has different platforms. If yes , it should has different jdk or jvm for each specific platform. As I think , different platforms mean I need to download different version of JDK. For instance , I need to download JDK for JavaEE platform which contains API for JavaEE.
It depends (like often).
The JDK is a development kit for Java SE including FX. So you can develop desktop applications but also web applications depending on the type of integration you prefer. The Java EE SDK contains also the Glassfish server, examples and tutorials but they are not really needed. The ME is a special minimized versions for embedded device development including special tools for that.
I am developing web application for years with a Java SE JDK only. As I normally use Spring Boot with an embedded container or install a Tomcat on demand, this works perfectly and the Java EE SDK is not needed.
I am currently designing a SDK that is intended to be used in both desktop and web applications. Currently I have been developing this SDK in using the JavaSE-1.6 Library and utilizing the Apache HttpComponents library as well as the JibX Library for web connections and xml parsing respectively.
If I wish to develop a web application using the JavaEE library, would I be able to use the SDK that I have developed in JSE-1.6?
If so, are there any compatibility issues that I need to be aware of?
If not, would it be better to develop the SDK in JavaEE, or would I run into the same compatibility problems if I wished to create a desktop application?
J2EE/Java EE is not mutually exclusive from Java SE as you seemed to expect, given the question. Instead, Java EE requires Java SE to run. So if you just design your API to be compatible with Java SE, then it'll work equally fine on Java EE.
As to the version compatibility, checkout Wikipedia on the subject. For example, the current Java EE 6 requires a minimum of Java SE 1.6.
in a tutorial they asked me to install the application server which could be downloaded from their site.
what do they mean with application server?
the link they provided: http://java.sun.com/javaee/downloads/index.jsp
i mean come on sun, all these names. jdk then j2ee..and when i wanna download j2se it says jdk6. r they insane? a lot of people are wondering what is what...they just dont know how to name things.
however, back to the question. so with application they mean java ee server?
i've got a mac and people say java is already installed. what is installed exactly? the j2ee or j2se? do i have do download j2ee? Java is just killing me...
EDIT: read something about that the application server is a name for ee server. and there are many ee servers like tomcat, jetty and glassfish. and i know these sometimes are called servlet containers.
so that makes application server = ee server = servlet container?
and jdk = j2se? so j2ee != jdk?
Sun's Application Server has been superseded by the community app server, GlassFish.
The JavaEE download page only has two JavaEE6 download links and both contain versions GlassFish v3. Chances are you only need the web profile, but download the full version if you aren't sure.
Note that GlassFish is just the reference Application Server. You also have other Application servers, such as Apache Geronimo and Oracle Weblogic... as well as ones that are just servlet containers, like Apache Tomcat and Jetty. These types should correspond to GlassFish's normal and web profiles respectively.
These other servers only require a JRE to run applications, or the JDK to develop for them.
Side Note: GlassFish v3 is the only JavaEE 6-compliant server... JavaEE 6 is brand new. The others should be JavaEE 5 compliant.
Also, JavaEE is the new name for J2EE, as sun tries to move away from the Java 2 name.
What do they mean with application server? The link they provided: http://java.sun.com/javaee/downloads/index.jsp
An application server is a component-based middleware used in server centric N-tier architecture. It manages the life-cycle of components deployed on it, it provides services for state maintenance, data access (with pooling of resources), security, clustering and fail-over.
AFAIK, one of the first application server (as just defined above) was ATG Dynamo. Other proprietary application servers include BroadVision, ColdFusion, etc. But none of them really survived to the advent of Java application servers (understand application servers based on the standards defined by Java EE and the Java language).
I mean come on sun, all these names. (...)
Wikipedia does a pretty good job at defining what Java SE is:
Java Platform, Standard Edition or Java SE is a widely used platform for programming in the Java language. It is the Java Platform used to deploy portable applications for general use. In practical terms, Java SE consists of a virtual machine, which must be used to run Java programs, together with a set of libraries (or "packages") needed to allow the use of file systems, networks, graphical interfaces, and so on, from within those programs.
The JRE (Java Runtime Environment) provides the virtual machine and the set of libraries i.e. everything you need to run Java software. The JDK (Java Development Kit) provides a JRE plus a compiler (javac) and some other tools i.e. everything you need to run and develop Java software.
Java EE is a specification (more precisely, a set of specifications) built on top of the libraries provided by Java SE and is more server-side oriented. Implementations of this specification are provided by Java application servers: GlassFish is Sun's implementation, JBoss is RedHat's implementation, WebLogic is BEA Oracle's implementation, WebSphere is IBM's implementation, etc.
Regarding the versions and nomenclature, yes, Sun is crazy. It was an horrible mistake to introduce this "Java 2 Platform, Standard Edition" naming when the version 1.2 came out. I can imagine how confusing this is. But, again, Wikipedia does a great job at clarifying this in the section Nomenclature, standards and specifications:
Java SE was known as Java 2 Platform, Standard Edition or J2SE from version 1.2 until version 1.5. The "SE" is used to distinguish the base platform from Java EE and Java ME. The "2" was originally intended to emphasize the major changes introduced in version 1.2, but was removed in version 1.6. The naming convention has been changed several times over the Java version history. (...)
This should make things more clear.
(...) however, back to the question. so with application server they mean java ee server?
Yes, this is what they mean or, more precisely, they mean Sun GlassFish Enterprise Server (previously named Sun Java System Application Server). Source: http://developers.sun.com/appserver/.
I've got a mac and people say java is already installed. what is installed exactly? the j2ee or j2se? do i have do download j2ee? Java is just killing me...
A JRE or a JDK (if javac available, it's a JDK), so only the Java SE part. And actually, if you are still following me, you don't download Java EE, you download something providing an implementation of it (i.e. an application server).
(...) so that makes application server = ee server = servlet container?
No. To simplify, a Java EE server = Servlet container + EJB Container. Some server are only Servlet container (like Tomcat, Jetty), they don't provide the EJB container part and thus don't fully implement the Java EE specification and can't be considered as full Java EE servers.
and jdk = j2se? so j2ee != jdk?
I hope I covered this with my answer.
In order to run you Java EE applications you need an application server.
The link you provided is to download GlassFish that is one application server.
There are others application servers like Apache Tomcat, Jboss.
JDK stands for Java Development Kit
You need this to develop Java applications.
JRE stands for Java Runtime Environment
You need this to run Java applications.
GlassFish with the Java EE SDK (provided on the link you gave) is what you need. Java EE server = application server.
What is installed on your Mac by default is probably only a JRE (runtime environment) and not a JDK (development kit). Which means, you can run Java apps but not develop. By downloading GlassFish with the Java EE SDK, you'll get the full-blown SDK you need and a server to deploy on.
Hope that helps.