You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

installing-java.adoc 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. ---
  2. title: Installing Java
  3. order: 30
  4. layout: page
  5. ---
  6. [[installing.java]]
  7. = Installing Java SDK
  8. A Java SDK is required by Vaadin and also by any of the Java IDEs.
  9. Vaadin is compatible with Java 1.6 and later editions, be we recommend using Java 8 for Vaadin development.
  10. Java EE 7 is required for proper server push support with WebSockets.
  11. [[installing.java.windows]]
  12. == Windows
  13. Follow the following steps:
  14. . Download Oracle Java SE 8.0 from
  15. link:http://www.oracle.com/technetwork/java/javase/downloads/index.html[http://www.oracle.com/technetwork/java/javase/downloads/index.html]
  16. . Install the Java SDK by running the installer.
  17. The default options are fine.
  18. [[installing.linux]]
  19. == Linux / UNIX
  20. Most Linux systems either have JDK preinstalled or allow installing it through a
  21. package management system. Notice however that they have OpenJDK as the default
  22. Java implementation. While it is known to have worked with Vaadin and possibly
  23. also with the development toolchain, we do not especially support it.
  24. Regarding OS X, notice that JDK 1.6 or newer is included in OS X 10.6 and newer.
  25. Otherwise:
  26. . Download Oracle Java SE 8.0 from
  27. link:http://www.oracle.com/technetwork/java/javase/downloads/index.html[http://www.oracle.com/technetwork/java/javase/downloads/]
  28. . Decompress it under a suitable base directory, such as [filename]#/opt#. For
  29. example, for Java SDK, enter (either as root or with [command]#sudo# in Linux):
  30. +
  31. [subs="normal"]
  32. ----
  33. [prompt]#+++#+++# [command]#cd# [replaceable]#/opt#
  34. [prompt]#+++#+++# [command]#sh# [replaceable]##<path>##/jdk-[replaceable]##<version>##.bin
  35. ----
  36. +
  37. and follow the instructions in the installer.
  38. . Set up the [literal]#++JAVA_HOME++# environment variable to point to the Java
  39. installation directory. Also, include the [literal]#++$JAVA_HOME/bin++# in the
  40. [literal]#++PATH++#. How you do that varies by the UNIX variant. For example, in
  41. Linux and using the Bash shell, you would add lines such as the following to the
  42. [filename]#.bashrc# or [filename]#.profile# script in your home directory:
  43. +
  44. ----
  45. export JAVA_HOME=/opt/jdk1.8.0_31
  46. export PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
  47. ----
  48. +
  49. You could also make the setting system-wide in a file such as
  50. [filename]#/etc/bash.bashrc#, [filename]#/etc/profile#, or an equivalent file.
  51. If you install Apache Ant or Maven, you may also want to set up those in the
  52. path.
  53. +
  54. Settings done in a [filename]#bashrc# file require that you open a new shell
  55. window. Settings done in a [filename]#profile# file require that you log in into
  56. the system. You can, of course, also give the commands in the current shell.