데이터 소스 Java 라이브러리 설치
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
이 페이지에서는 Google 시각화 Java 라이브러리를 사용 또는 수정하는 방법과 프로젝트의 오픈소스 코드에 참여하는 방법을 설명합니다.
목차
요구사항
Google 시각화 Java 라이브러리를 사용하려면 다음 구성요소가 있어야 합니다.
종속 항목
데이터 소스 Java 라이브러리에는 다음과 같은 종속 항목이 있습니다. 라이브러리는 나열된 버전으로 테스트되었습니다. 다른 버전은 허용 가능할 수 있지만 테스트되지는 않았습니다.
소스 또는 다운로드에 포함:
소스 또는 다운로드에 포함되지 않음:
제공된 라이브러리 사용
이 섹션에서는 시각화 Java 라이브러리를 수정할 필요가 없는 경우 이 라이브러리를 사용하는 방법을 설명합니다. 이 프로세스는 빌드 시스템에 따라 다릅니다.
Maven을 사용하는 경우 다음과 같은 설정으로 시각화 라이브러리의 종속 항목을 설정하세요.
- 그룹 ID: com.google.visualization
- 아티팩트 ID: 시각화-datasource
- 버전 번호: 프로젝트 페이지에 나열된 최신 버전 번호를 사용합니다.
다른 빌드 시스템을 사용하는 경우:
예 실행
JAR 예제 파일은 다운로드 가능한 ZIP 파일에 라이브러리 JAR와 함께 포함됩니다. 예시를 실행하는 방법은 시작하기 페이지를 참조하세요.
라이브러리 수정
라이브러리 코드를 수정하려면 오픈소스 호스팅 사이트에서 소스를 다운로드하여 빌드해야 합니다. 이렇게 하기 전에 프로젝트 페이지의 '코드 라이선스' 섹션에 연결된 라이선스 정보를 읽고 사용 사례가 허용되는지 확인하세요.
다음은 라이브러리를 다운로드하고 빌드하는 단계입니다.
- 오픈소스 프로젝트 페이지의 소스 > 결제 탭에 설명된 대로 SVN을 사용하여 소스 코드를 다운로드합니다.
- 코드를 빌드합니다. Maven에서 빌드하는 경우 소스와 함께 제공되는 pom.xml 파일을 사용하세요. Apache Ant로 빌드하는 경우 다음 안내를 따릅니다. 코드는 Ant 버전 1.7.0으로 테스트되었습니다. 이전 버전의 Ant가 있으면 업그레이드해야 할 수 있습니다.
Ant 빌드 지침
1. 빌드 속성을 수정합니다.
- 선택한 설치 디렉터리의
build-src
하위 디렉터리로 이동합니다.
- 텍스트 편집기를 사용하여
build.properties
파일을 열고 다음과 같이 변경합니다.
2. 라이브러리를 빌드합니다.
파일의 build-src
하위 디렉터리를 탐색하고 다음 중 하나를 입력합니다.
ant datasource
- 데이터 소스 라이브러리를 빌드합니다.
ant example
- 예시를 빌드합니다.
ant
- 데이터 소스와 예시를 모두 빌드합니다.
ant test
- 데이터 소스 라이브러리 테스트를 빌드하고 실행합니다.
라이브러리를 수정할 때 매우 유용합니다.
오픈소스 프로젝트에 기여
오픈소스 프로젝트에 변경사항을 적용하려면 프로젝트에 대한 제출 권한을 얻어야 합니다. 변경사항 제출 방법에 대한 권한과 안내를 요청하는 이메일을 google-visualization-api@googlegroups.com으로 보내주세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-07-10(UTC)
[null,null,["최종 업데이트: 2024-07-10(UTC)"],[[["\u003cp\u003eThis documentation guides you on utilizing and extending the Google Visualization Java library for incorporating interactive charts into your applications.\u003c/p\u003e\n"],["\u003cp\u003eIt outlines prerequisites, dependencies, and steps for utilizing the library directly or modifying it to suit your specific needs.\u003c/p\u003e\n"],["\u003cp\u003eInstructions are provided for building the library from source and running included examples for a hands-on understanding.\u003c/p\u003e\n"],["\u003cp\u003eFor those interested in contributing to the project, guidance is offered on seeking permissions and submitting changes to the open-source codebase.\u003c/p\u003e\n"]]],[],null,["# Installing the Data Source Java Library\n\nThis page describes how to use or modify the Google Visualization Java library,\nand how to contribute to the open source code for the project.\n\nContents\n--------\n\n1. [Requirements](#requirements)\n2. [Dependencies](#dependencies)\n3. [Using the Library as Provided](#usingthelibrary)\n4. [Running the Examples](#buildingexamples)\n5. [Modifying the Library](#build_self)\n6. [Contributing to the Open Source Project](#contributing)\n\nRequirements\n------------\n\nYou must have the following components in order to use the Google Visualization\nJava library:\n\n- A servlet container and the Servlet API version 2.4 or higher. One of the most commonly used servlet containers is Apache Tomcat, which includes the Servlet API. See \u003chttp://tomcat.apache.org/download-55.cgi\u003e to download the binary for version 5.5. You need install only the Core module. You also need Tomcat to complete the tutorial sections: [Getting\n Started](/chart/interactive/docs/dev/dsl_get_started), [Using an External Data Store](/chart/interactive/docs/dev/dsl_csv), and [Defining\n Capabilities and the Flow of Events](/chart/interactive/docs/dev/dsl_httpservlet).\n- The [Java Development Kit](http://java.sun.com/) version 6.0 or greater.\n\n **Note** : It is also possible to use the JDK\n version 5.0. However, you must then remove `@Override` from\n every method in the library that overrides an interface method. This is\n due to the change in the `@Override` annotation behavior in\n JDK version 6.0.\n\nDependencies\n------------\n\nThe data source Java library has the following dependencies. The library was\ntested with the versions listed; other versions might be acceptable, but have not\nbeen tested.\n\n**Included in the source or download:**\n\n- [icu4j](http://site.icu-project.org/) version 4.0.1.\n- [Jakarta commons lang](http://commons.apache.org/lang/) version 2.4.\n- [Jakarta commons logging](http://commons.apache.org/logging/) version 1.1.1.\n- [Google collections\n library](http://code.google.com/p/google-collections/) version 1.0.\n- [*javacc*](https://javacc.dev.java.net/) version 4.2. This is required only if you intend to compile the libraries, for example when modifying them as described [below](#build_self).\n- [*opencsv*](http://opencsv.sourceforge.net/) version 1.8. This is required only if you intend to use a CSV data source.\n\n**Not included in the source or download:**\n\n- To use the `SqlDataSourceHelper` class with a mySQL database, you also need `mysql.jar` in your runtime environment. See: \u003chttp://www.mysql.com/products/connector/j/\u003e for details and downloadable versions.\n\nUsing the Library as Provided\n-----------------------------\n\nThis section describes how to use the visualization Java library if you don't\nneed to modify it. This process varies with your build system:\n\n**If using [Maven](http://maven.apache.org/index.html),** set\nup a dependency on the visualization library with the following settings:\n\n- Group ID: com.google.visualization\n- Artifact ID: visualization-datasource\n- Version number: Use the latest version number listed on the [project\n page](http://code.google.com/p/google-visualization-java/).\n\n**If using any other build system**:\n\n- [Download\n the library ZIP file](http://code.google.com/p/google-visualization-java/) from the project page, unzip the files, and include them in your project as your build system requires.\n\nRunning the Examples\n--------------------\n\nThe JAR example files are included along with the library JARs in the [downloadable\nZIP file](http://code.google.com/p/google-visualization-java/). Instructions on running the examples are given on the [Getting\nStarted](/chart/interactive/docs/dev/dsl_get_started) page.\n\nModifying the Library\n---------------------\n\nIf you want to modify the library code, you'll have to download the source from\nthe open source hosting site and build it. Before doing this, read the licensing\ninformation linked to by the \"Code license\" section on the [project\npage](http://code.google.com/p/google-visualization-java/) to see whether your use case is allowed.\n\nHere are the steps for downloading and building the library:\n\n1. **Download the source code** using SVN, as described in on the **Source \\\u003e Checkout** tab on the [open\n source project page](http://code.google.com/p/google-visualization-java/source/checkout).\n2. **Build your code.** If building in Maven, use the pom.xml file provided with the source. If building with [Apache\n Ant](http://ant.apache.org/), follow the instructions given next (note that the code has been tested with Ant version 1.7.0; if you have an earlier version of Ant, you might need to upgrade)\n\n### Ant Build Instructions\n\n**1. Modify your build properties:**\n\n1. Navigate to the `build-src` subdirectory of your chosen installation directory.\n2. Using a text editor, open the `build.properties` file and make the following changes:\n - Edit the `servlet-api.jar` property to point to your `servlet-api.jar` file. For example, if you installed Tomcat to your `c:` drive in the `tomcat_home` directory, then you would specify the `servlet-api.jar` property as follows: \n `servlet-api.jar=C:/tomcat_home/common/lib/servlet-api.jar`\n\n **Note**: Use forward slashes rather than\n backslashes in the file path, even when using Windows\n - To use your own copies of the dependencies described above, edit the paths in the same build.properties file.\n\n**2. Build the library:**\n\nNavigate the `build-src` subdirectory in the file and type one of the\nfollowing:\n\n- `ant datasource` - Builds the data source library\n- `ant example` - Builds the examples\n- `ant` - Builds both data source and examples\n- `ant test` - Builds and runs the data source library tests. Very useful when you are modifying the library.\n\nContributing to the Open Source\nProject\n---------------------------------------\n\nIf you want to contribute changes to the open source project, you'll have to get\nsubmission permissions to the project. Send an email to [google-visualization-api@googlegroups.com](mailto:google-visualization-api@googlegroups.com) asking\nfor permission and instructions on how to submit changes."]]