--- title: Installing Java order: 30 layout: page --- [[installing.java]] = Installing Java SDK A Java SDK is required by Vaadin and also by any of the Java IDEs. Vaadin Framework 8 requires Java 8. Java EE 7 is required for proper server push support with WebSockets. [[installing.java.windows]] == Windows Follow the following steps: . Download Oracle Java SE 8.0 from link:http://www.oracle.com/technetwork/java/javase/downloads/index.html[http://www.oracle.com/technetwork/java/javase/downloads/index.html] . Install the Java SDK by running the installer. The default options are fine. [[installing.linux]] == Linux / UNIX Most Linux systems either have JDK preinstalled or allow installing it through a package management system. Notice however that they have OpenJDK as the default Java implementation. While it is known to have worked with Vaadin Framework and possibly also with the development toolchain, we do not especially support it. Depending on your OS distribution, you may have to download Java JDK 8: . Download Oracle Java SE 8.0 from link:http://www.oracle.com/technetwork/java/javase/downloads/index.html[http://www.oracle.com/technetwork/java/javase/downloads/] . Decompress it under a suitable base directory, such as [filename]#/opt#. For example, for Java SDK, enter (either as root or with [command]#sudo# in Linux): + [subs="normal"] ---- [prompt]#+++#+++# [command]#cd# [replaceable]#/opt# [prompt]#+++#+++# [command]#sh# [replaceable]####/jdk-[replaceable]####.bin ---- + and follow the instructions in the installer. . Set up the [literal]#++JAVA_HOME++# environment variable to point to the Java installation directory. Also, include the [literal]#++$JAVA_HOME/bin++# in the [literal]#++PATH++#. How you do that varies by the UNIX variant. For example, in Linux and using the Bash shell, you would add lines such as the following to the [filename]#.bashrc# or [filename]#.profile# script in your home directory: + ---- export JAVA_HOME=/opt/jdk1.8.0_31 export PATH=$PATH:$HOME/bin:$JAVA_HOME/bin ---- + You could also make the setting system-wide in a file such as [filename]#/etc/bash.bashrc#, [filename]#/etc/profile#, or an equivalent file. If you install Apache Ant or Maven, you may also want to set up those in the path. + Settings done in a [filename]#bashrc# file require that you open a new shell window. Settings done in a [filename]#profile# file require that you log in into the system. You can, of course, also give the commands in the current shell. .4'>chore-mention-8.14.4 Vaadin 6, 7, 8 is a Java framework for modern Java web applications: https://github.com/vaadin/frameworkwww-data
aboutsummaryrefslogtreecommitdiffstats
blob: 451715f3c516b5144a901fdc9eb00c561809cc80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#coding=UTF-8

# See BuildArchetypes for details on environment
# BuildDemos needs git in PATH and depends on gitpython library
# gitpython can be installed with python installer script "pip":
# pip install gitpython	
#
# Deployment dependency: requests
# pip install requests
# Deploy depends on .deployUrl and .deployCredentials files in home folder

import sys, os
from os.path import join, isfile
from fnmatch import fnmatch
from xml.etree.ElementTree import ElementTree

# Validated demos. name -> git url
demos = {
	"dashboard" : "https://github.com/vaadin/dashboard-demo.git",
	"parking" : "https://github.com/vaadin/parking-demo.git",
	"addressbook" : "https://github.com/vaadin/addressbook.git",
	"grid-gwt" : "https://github.com/vaadin/grid-gwt.git"
}

def checkout(folder, url):
	Repo.clone_from(url, join(resultPath, folder))

if __name__ == "__main__":
	# Do imports.	
	try:
		from git import Repo
	except:
		print("BuildDemos depends on gitpython. Install it with `pip install gitpython`")
		sys.exit(1)
	from BuildHelpers import updateRepositories, mavenValidate, copyWarFiles, getLogFile, removeDir, getArgs, mavenInstall, resultPath, readPomFile, parser
	from DeployHelpers import deployWar

	# Add command line argument for staging repos
	parser.add_argument("--repo", type=str, help="Staging repository URL", default=None)

	# Add command line agrument for ignoring failing demos
	parser.add_argument("--ignore", type=str, help="Ignored demos", default="")

	args = getArgs()
	if hasattr(args, "artifactPath") and args.artifactPath is not None:
		version = False
		basePath = args.artifactPath
		poms = []
		for root, dirs, files in os.walk(basePath):
			for name in files:
				if fnmatch(name, "*.pom"):
					poms.append(join(root, name))
		for pom in poms:
			jarFile = pom.replace(".pom", ".jar")
			if isfile(jarFile):
				mavenInstall(pom, jarFile)
			else:
				mavenInstall(pom)
			if "vaadin-server" in pom:
				pomXml, nameSpace = readPomFile(pom)
				for version in pomXml.getroot().findall("./{%s}version" % (nameSpace)):
					args.version = version.text
	demosFailed = False
	ignoredDemos = args.ignore.split(",")
	
	for demo in demos:
		print("Validating demo %s" % (demo))
		try:
			checkout(demo, demos[demo])
			if hasattr(args, "repo") and args.repo is not None:
				updateRepositories(join(resultPath, demo), args.repo)
			mavenValidate(demo, logFile=getLogFile(demo))
			resultWars = copyWarFiles(demo)
			for war in resultWars:
				try:
					deployWar(war)
				except Exception as e:
					print("War %s failed to deploy: %s" % (war, e))
					demosFailed = True
			print("%s demo validation succeeded!" % (demo))
		except Exception as e:
			print("%s demo validation failed: %s" % (demo, e))
			if demo not in ignoredDemos:
				demosFailed = True
		removeDir(demo)
		print("")
	if demosFailed:
		sys.exit(1)