itext와 같은 라이브러리로 Java 응용 프로그램을 배포하는 방법은 무엇입니까? (how to distribute a java-application with libraries such as itext?)


문제 설명

itext와 같은 라이브러리로 Java 응용 프로그램을 배포하는 방법은 무엇입니까? (how to distribute a java‑application with libraries such as itext?)

저는 자바로 애플리케이션을 작성했습니다. iText, jXLJAI를 사용합니다.

이러한 모든 라이브러리가 포함된 jar를 어떻게 빌드합니까? 아니면 사용자가 강제로 설치해야 합니까?


참조 솔루션

방법 1:

Either unpack the jars into your jar, or just add them to the jar classpath via the Class‑Path attribute in your meta‑inf, and distribute the libraries along with your main jar. Sample META_INF/Manifest.mf:

Manifest‑Version: 1.0
Class‑Path: itext.jar jxl.jar jai.jar
Main‑Class: com.xxx.yyy.Main

방법 2:

As soon as you're dealing with external libraries, you should have a look at Maven. This tool is a builder such as Ant, but it is able to handle library dependencies automatically. With this builder, you'll be able to both embed your project's dependencies in your jar and also to allow users to build it on their own computer without downloading library dependencies manually.

Here is the project's website: http://maven.apache.org/ where you can find quick how‑tos: http://maven.apache.org/users/index.html and finally eBooks to go further: http://maven.apache.org/articles.html

방법 3:

You could pack all jars into one while building your project with Ant. If you use NetBeans, This page describes how can modify NetBeans' build scripts to do it for you.

방법 4:

You could use an utility like jarjar to merge your classes and the other libraries into a single deployable file.

방법 5:

Thanks for all solutions!

Fatjar is a great plugin for Eclipse that does all this too (:

(by SvenDenis TulskiyjopasseratperpElijah CornellSven)

참조 문서

  1. how to distribute a java‑application with libraries such as itext? (CC BY‑SA 3.0/4.0)

#itext #distribution #java






관련 질문

iText로 가변 페이지 PDF를 생성하려고 할 때 예외 (Exception when attempting to generate variable-page PDF with iText)

Icepdf 특수 문자 렌더링 문제 (Icepdf special character rendering issue)

JAVA에서 PDF 양식 테이블 채우기 (Filling PDF form tables in JAVA)

itext를 사용하여 poi에서 차트 내보내기 (Exporting charts from poi using itext)

표 셀에 사각형을 그리는 방법은 무엇입니까? (How to draw rectangles in a Table cell?)

동적 컨트롤로 PDF 양식 템플릿 수정 (Modify PDF Form Template with dynamic controls)

itext와 같은 라이브러리로 Java 응용 프로그램을 배포하는 방법은 무엇입니까? (how to distribute a java-application with libraries such as itext?)

종이 Itext7에서 첫 번째 줄과 마지막 줄 속성을 제거합니다. (Remove the first and last lines properties in the paper Itext7)

Java에서 iText 5를 사용하여 여러 셀을 만들고 각 셀에 각 문자를 설정하는 방법 (How to create multiple cells and set each character into each cell using iText 5 in Java)

iTextSharp(또는 iText 5)를 사용하여 다른 PdfImportedPage의 배경으로 전체 PdfImportedPage를 추가하는 방법 (How to add a full PdfImportedPage as background for another PdfImportedPage with iTextSharp (or iText 5))

그래픽 텍스트 효과가 있는 텍스트 요소 (Text element with graphical text effects)

iText7을 사용하여 PDFButtonFormField에 이미지를 추가할 때 종횡비를 유지하는 방법 (How to Maintain Aspect Ratio when Adding an Image to a PDFButtonFormField using iText7)







코멘트