Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I distribute a JDK with my application?

I am working on an application called Enchanting. The application, based on Scratch, emits Java source code and compiles it for uploading onto LEGO Mindstorms NXT Robots.

While the application is very early, users have a hard time installing it.

Right now Windows users have to:

  • download and install a Java Developer Kit
  • download and install LeJOS (a java library for the NXT)
  • possibly tweak environment variables
  • then they can download, install, and run Enchanting itself

If I could provide an installer that would include the JDK, and LeJOS, I could figure out the environment variables at run time, and the process becomes:

  • Download, install, and run Enchanting

Is there a way to redistribute a JDK?

(Incidentally, Processing (a simplified text-based programming environment) seems to offer a version that comes with the JDK, so it appears that there is a legitimate way to do so).

Addendum: I would like a Windows user who does not have java installed to be able to run a single .exe file to install the JDK, LeJOS, and Enchanting.

like image 664
Clinton Blackmore Avatar asked Nov 09 '10 00:11

Clinton Blackmore


People also ask

Is JDK a Java application server?

The JDK is for Java developers. It contains a complete JRE as described above and tools required to create Java programs, sign code, generate documentation, etc. The JDK also ships several tools meant to monitor and debug programs.

How do you bundle a Java application?

The recommended way to package Java applications is to use a collection of Ant tasks ( ant-javafx. jar ), which are provided with the JRE. NetBeans IDE uses these Ant tasks to package JavaFX and Java SE projects. Embedded packaging support in NetBeans IDE covers most of the typical use cases.

Is Java still free for commercial use?

Oracle OpenJDK releases are under the open source GNU General Public License v2, with the Classpath Exception (GPLv2+CPE) (available since Java 9). Oracle JDK 17 and later is available under the Oracle No-Fee Terms and Conditions License which permits free use for all users.


1 Answers

The information regarding redistribution is here for Java 10 JDK and here for Java 8 JDK. Currently Java 8's is substantially more detailed than Java 10's.

and you can use PackJacket, to package all the files you need and create an installer.

like image 197
Eternal Noob Avatar answered Sep 30 '22 02:09

Eternal Noob