├── docker ├── .version ├── .dockerignore ├── build-image ├── recreate-container ├── kernel.json ├── Dockerfile └── README.md ├── javakernel ├── __init__.py ├── kernel.json ├── __main__.py └── kernel.py ├── notebook.png ├── .gitignore ├── README.md └── LICENSE /docker/.version: -------------------------------------------------------------------------------- 1 | 4 2 | 3 | -------------------------------------------------------------------------------- /docker/.dockerignore: -------------------------------------------------------------------------------- 1 | README.md 2 | 3 | -------------------------------------------------------------------------------- /javakernel/__init__.py: -------------------------------------------------------------------------------- 1 | from .kernel import JavaKernel 2 | -------------------------------------------------------------------------------- /notebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bachmann1234/java9_kernel/HEAD/notebook.png -------------------------------------------------------------------------------- /docker/build-image: -------------------------------------------------------------------------------- 1 | VER=3 2 | cd .. 3 | docker build -f docker/Dockerfile -t "jup/java:$VER" . 4 | cd - 5 | 6 | -------------------------------------------------------------------------------- /docker/recreate-container: -------------------------------------------------------------------------------- 1 | VER=3 2 | docker rm -vf "j$VER" 3 | docker run -d --name "j$VER" -p 18888:8888 "jup/java:$VER" 4 | -------------------------------------------------------------------------------- /javakernel/kernel.json: -------------------------------------------------------------------------------- 1 | { 2 | "argv": ["python3", "", 3 | "-f", "{connection_file}"], 4 | "display_name": "Java 9", 5 | "language": "java" 6 | } -------------------------------------------------------------------------------- /docker/kernel.json: -------------------------------------------------------------------------------- 1 | { 2 | "argv": ["python3", "/home/jovyan/work/javakernel", "-f", "{connection_file}"], 3 | "display_name": "Java 9", 4 | "language": "java", 5 | "env" : { 6 | "JAVA_9_HOME": "/home/jovyan/work/jdk-9", 7 | "KULLA_HOME": "/home/jovyan/work/kulla.jar" 8 | } 9 | } 10 | 11 | -------------------------------------------------------------------------------- /javakernel/__main__.py: -------------------------------------------------------------------------------- 1 | from kernel import JavaKernel 2 | 3 | 4 | if __name__ == '__main__': 5 | try: 6 | from ipykernel.kernelapp import IPKernelApp 7 | except: 8 | from IPython.kernel.zmq.kernelapp import IPKernelApp 9 | IPKernelApp.launch_instance(kernel_class=JavaKernel) 10 | -------------------------------------------------------------------------------- /docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM jupyter/base-notebook 2 | 3 | RUN wget -nc --quiet \ 4 | 'http://www.java.net/download/java/jdk9/archive/132/binaries/jdk-9-ea+132_linux-x64_bin.tar.gz' -O jdk-9.tgz && \ 5 | tar -xf jdk-9.tgz && \ 6 | rm -f jdk-9.tgz 7 | 8 | COPY 'docker/kulla.jar' /home/jovyan/work/kulla.jar 9 | RUN pip install --quiet jupyter 10 | 11 | RUN mkdir /home/jovyan/work/javakernel 12 | COPY javakernel/ /home/jovyan/work/javakernel 13 | 14 | RUN mkdir -p /home/jovyan/.ipython/kernels/java 15 | COPY docker/kernel.json /home/jovyan/.ipython/kernels/java/kernel.json 16 | -------------------------------------------------------------------------------- /docker/README.md: -------------------------------------------------------------------------------- 1 | # Docker continer for java9 notebook 2 | This is a proof of concept of docker container for java9 notebook. 3 | 4 | ### It is not production ready. Although it is fully functional by the time this file is written 5 | It just brings a lot of not relevant stuff inherited from "jupyter/base-notebook". 6 | 7 | ### Make sure to use build-image script in order to create docker image. 8 | "docker build" will fail because of the relative path to javakernel folder 9 | 10 | ### To build docker image 11 | First Download a [kulla.jar](https://github.com/AdoptOpenJDK/adoptopenjdk-getting-started-kit/blob/master/en/openjdk-projects/kulla/kulla.md) 12 | 13 | Rename it to kulla.jar and place it in the root of this project. The last tested jar was. kulla--20160821005845.jar 14 | 15 | from docker directory run 16 | 17 | ``` 18 | sudo ./build-image 19 | ``` 20 | and to re-create docker container listening on port 18888 21 | 22 | ``` 23 | sudo ./recreate-container 24 | ``` 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | 5 | # C extensions 6 | *.so 7 | 8 | # Distribution / packaging 9 | .Python 10 | env/ 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | *.egg-info/ 23 | .installed.cfg 24 | *.egg 25 | .venv 26 | 27 | # PyInstaller 28 | # Usually these files are written by a python script from a template 29 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 30 | *.manifest 31 | *.spec 32 | 33 | # Installer logs 34 | pip-log.txt 35 | pip-delete-this-directory.txt 36 | 37 | # Unit test / coverage reports 38 | htmlcov/ 39 | .tox/ 40 | .coverage 41 | .coverage.* 42 | .cache 43 | nosetests.xml 44 | coverage.xml 45 | *,cover 46 | 47 | # Translations 48 | *.mo 49 | *.pot 50 | 51 | # Django stuff: 52 | *.log 53 | 54 | # Sphinx documentation 55 | docs/_build/ 56 | 57 | # PyBuilder 58 | target/ 59 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # The kernel as of now is not working. Unclear on why. 2 | 3 | # java9_kernel 4 | An ipython kernel for java 9. Last tested Kulla.jar was kulla--20160821005845.jar 5 | 6 | ## Expectation Setting 7 | This is an experimental ipython kernel written with an experimental repl written for 8 | a unreleased java version. Don't expect this to be production ready. 9 | 10 | That being said. File issues and I'll do my best. 11 | 12 | ## Requirements 13 | 14 | Install [java9](http://www.oracle.com/technetwork/articles/java/ea-jsp-142245.html) 15 | 16 | Download a [kulla.jar](https://github.com/AdoptOpenJDK/adoptopenjdk-getting-started-kit/blob/master/en/openjdk-projects/kulla/kulla.md) 17 | 18 | This kernel expects two environment variables defined, which can be set in the kernel.json (described below): 19 | 20 | ``` 21 | KULLA_HOME - The full path of kulla.jar 22 | 23 | JAVA_9_HOME - like JAVA_HOME but pointing to a java 9 environment 24 | ``` 25 | 26 | ## Installing the kernel 27 | 28 | Assuming you have cloned the repo and got all the requirements above setup 29 | 30 | edit kernel.json replacing PATH_TO_javakernel to the location of the javakernel directory 31 | 32 | ``` 33 | mkdir ~/.ipython/kernels/java/ 34 | 35 | cp ~/.ipython/kernels/java/ 36 | ``` 37 | 38 | For example a kernel.json might look like this: 39 | 40 | ``` 41 | { 42 | "argv": ["python3", "/Users/bachmann/Code/java9_kernel/javakernel", 43 | "-f", "{connection_file}"], 44 | "display_name": "Java 9", 45 | "language": "java", 46 | "env" : { 47 | "JAVA_9_HOME": "/Users/bachmann/Code/jdk1.9.0", 48 | "KULLA_HOME": "/Users/bachmann/Code/kulla.jar" 49 | } 50 | } 51 | ``` 52 | 53 | If all worked you should be able to run the kernel: 54 | 55 | ``` 56 | ipython console --kernel java 57 | Jupyter Console 4.0.2 58 | 59 | [ZMQTerminalIPythonApp] Loading IPython extension: storemagic 60 | java version "1.9.0-ea" 61 | Java(TM) SE Runtime Environment (build 1.9.0-ea-b71) 62 | Java HotSpot(TM) 64-Bit Server VM (build 1.9.0-ea-b71, mixed mode) 63 | 64 | In [1]: System.out.println("OMG") 65 | System.out.println("OMG") 66 | OMG 67 | ``` 68 | 69 | It should work in a notebook as well: 70 | 71 | ![Notebook Screenshot](notebook.png?raw=true) 72 | 73 | Troubleshooting: 74 | 75 | Ensure the Kulla Jar is executable otherwise nothing will work. 76 | 77 | If you are having issues saying things like "Module not found" or anything that suggests a dependency has not been installed and you are sure it *is* installed. Try verifying your python version. The example kernel in this readme is setup for python3. If you copy and paste it ensure you have your environment setup for python 3. Otherwise just update the kernel.json to point to whatever python environment you have setup. 78 | -------------------------------------------------------------------------------- /javakernel/kernel.py: -------------------------------------------------------------------------------- 1 | from subprocess import check_output 2 | import signal 3 | metakernel = False 4 | try: 5 | from metakernel import MetaKernel as Kernel 6 | metakernel = True 7 | except: 8 | try: 9 | from ipykernel.kernelbase import Kernel 10 | except ImportError: 11 | from IPython.kernel.zmq.kernelbase import Kernel 12 | import os 13 | import re 14 | from pexpect import replwrap, EOF 15 | 16 | 17 | class JavaKernel(Kernel): 18 | implementation = 'java_kernel' 19 | implementation_version = 0.1 20 | langauge = "java" 21 | language_version = "1.9.0-ea" 22 | language_info = {'name': 'java', 23 | 'mimetype': 'application/java-vm', 24 | 'file_extension': '.class'} 25 | 26 | _JAVA_COMMAND = '{}/bin/java'.format(os.environ['JAVA_9_HOME']) 27 | _KULLA_LOCATION = os.environ['KULLA_HOME'] 28 | 29 | def __init__(self, **kwargs): 30 | super(JavaKernel, self).__init__(**kwargs) 31 | self._banner = None 32 | self.env = {"JAVA_9_HOME": os.environ['JAVA_9_HOME'], 33 | "KULLA_HOME": os.environ['KULLA_HOME']} 34 | self._start_java_repl() 35 | 36 | @property 37 | def banner(self): 38 | if self._banner is None: 39 | self._banner = check_output([self._JAVA_COMMAND, '-version']).decode('utf-8') 40 | return self._banner 41 | 42 | def _start_java_repl(self): 43 | sig = signal.signal(signal.SIGINT, signal.SIG_DFL) 44 | try: 45 | self.javawrapper = replwrap.REPLWrapper( 46 | "{} -jar {}".format( 47 | self._JAVA_COMMAND, 48 | self._KULLA_LOCATION 49 | ), 50 | u'jshell> ', 51 | None, 52 | continuation_prompt=u' ...> ' 53 | ) 54 | finally: 55 | signal.signal(signal.SIGINT, sig) 56 | 57 | 58 | def do_execute(self, code, silent, store_history=True, user_expressions=None, allow_stdin=False): 59 | """ 60 | :param code: 61 | The code to be executed. 62 | :param silent: 63 | Whether to display output. 64 | :param store_history: 65 | Whether to record this code in history and increase the execution count. 66 | If silent is True, this is implicitly False. 67 | :param user_expressions: 68 | Mapping of names to expressions to evaluate after the code has run. You can ignore this if you need to. 69 | :param allow_stdin: 70 | Whether the frontend can provide input on request 71 | :return: 72 | dict https://ipython.org/ipython-doc/dev/development/messaging.html#execution-results 73 | """ 74 | if metakernel: 75 | return super(JavaKernel, self).do_execute(code, silent, store_history, user_expressions, allow_stdin) 76 | else: 77 | return self._do_execute(code, silent) 78 | 79 | def _execute_java(self, code): 80 | """ 81 | :param code: 82 | The code to be executed. 83 | :return: 84 | interrupted and output 85 | """ 86 | interrupted = False 87 | try: 88 | output = self.javawrapper.run_command(code.rstrip(), timeout=None) 89 | except KeyboardInterrupt: 90 | self.javawrapper.child.sendintr() 91 | interrupted = True 92 | self.javawrapper._expect_prompt() 93 | output = self.javawrapper.child.before 94 | except EOF: 95 | output = self.javawrapper.child.before + 'Restarting java' 96 | self._start_java_repl() 97 | return interrupted, output 98 | 99 | 100 | def do_execute_direct(self, code, silent=False): 101 | """ 102 | :param code: 103 | The code to be executed. 104 | :param silent: 105 | Whether to display output. 106 | :return: 107 | Return value, or None 108 | 109 | MetaKernel code handler. 110 | """ 111 | if not code.strip(): 112 | return None 113 | 114 | interrupted, output = self._execute_java(code) 115 | exitcode = "| Error:" in output 116 | 117 | # Look for a return value: 118 | retval = None 119 | for expr in [".*\| Expression value is: ([^\n]*)", 120 | ".*\| Variable [^\n]* of type [^\n]* has value ([^\n]*)"]: 121 | match = re.match(expr, output, re.MULTILINE | re.DOTALL) 122 | if match: 123 | sretval = match.groups()[0] 124 | try: 125 | # Turn string into a Python value: 126 | retval = eval(sretval) 127 | except: 128 | retval = sretval 129 | break 130 | 131 | if not silent: 132 | if exitcode: 133 | self.Error(output) 134 | else: 135 | print(output) 136 | return retval 137 | 138 | def _do_execute(self, code, silent): 139 | """ 140 | :param code: 141 | The code to be executed. 142 | :param silent: 143 | Whether to display output. 144 | :return: 145 | Return value, or None 146 | 147 | Non-metakernel code handler. Need to construct all messages. 148 | """ 149 | if not code.strip(): 150 | return {'status': 'ok', 'execution_count': self.execution_count, 151 | 'payload': [], 'user_expressions': {}} 152 | 153 | interrupted, output = self._execute_java(code) 154 | 155 | if not silent: 156 | stream_content = {'name': 'stdout', 'text': output} 157 | self.send_response(self.iopub_socket, 'stream', stream_content) 158 | 159 | if interrupted: 160 | return {'status': 'abort', 'execution_count': self.execution_count} 161 | 162 | exitcode = "| Error:" in output 163 | 164 | if exitcode: 165 | return {'status': 'error', 'execution_count': self.execution_count, 166 | 'ename': '', 'evalue': output, 'traceback': []} 167 | else: 168 | return {'status': 'ok', 'execution_count': self.execution_count, 169 | 'payload': [], 'user_expressions': {}} 170 | 171 | 172 | def get_completions(self, info): 173 | """ 174 | Get command-line completions (TAB) from JShell: 175 | 176 | /vars 177 | | Test test = Test@1c2c22f3 178 | 179 | /methods 180 | | printf (Ljava/lang/String;[Ljava/lang/Object;)V 181 | | draw ()V 182 | 183 | /classes 184 | | class Test 185 | 186 | """ 187 | token = info["help_obj"] 188 | matches = [] 189 | for command, parts, part, text in [("/vars", 3, 1, ""), 190 | ("/methods", 2, 0, "()"), 191 | ("/classes", 2, 1, "()")]: 192 | interrupt, output = self._execute_java(command) 193 | for line in output.split("\n"): 194 | if len(line) > 1 and line[0] == "|": 195 | items = line[1:].strip().split(" ", parts) 196 | if items[part].startswith(token): 197 | matches.append(items[part] + text) 198 | return matches 199 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | 203 | --------------------------------------------------------------------------------