Wrapper Simple to use

Source: Internet
Author: User

First, download

  

http://wrapper.tanukisoftware.com/doc/english/download.jsp

Download package

Wrapper-linux-x86-64-3.5.30.tar.gz

Extract

Tar xvf/usr/file/wrapper-linux-x86-64-3.5.30.tar.gz-c/usr/java/

Renaming

CD/USR/JAVAMV wrapper-linux-x86-64-3.5.30 Wrapper
Second, the test code

Create a simple MAVEN project called Code, and write a main class Main.java

Package Com.xmyself.code;public class Main {public static void main (string[] args) {System.out.println ("Start wrapper suc Cess ");}}

Package as jar file, full name Code-0.0.1-snapshot.jar, place file in CentOS/usr/file directory

Third, the configuration

Go to configuration file directory

Cd/usr/java/wrapper/conf

Edit wrapper.conf

VI wrapper.conf

Modify the following content

# Java Main class.  This class must implement the Wrapperlistener interface#  or guarantee so the Wrappermanager class is Initialized.
   helper# classes is provided to does this for you  .  See the integration section# of the  documentation for details.wrapper.java.mainclass=com.xmyself.code.main# Java Classpath (include Wrapper.jar)  Add class path elements as#  needed starting from 1wrapper.java.classpath.1=. /lib/wrappertest.jarwrapper.java.classpath.2=. /lib/wrapper.jarwrapper.java.classpath.3=/usr/file/code-0.0.1-snapshot.jar# Name of the Servicewrapper.name= testwrapper# Display Name of the servicewrapper.displayname=test Wrapper Sample application# Description of the Servicewra Pper.description=test Wrapper Sample Application Description
Four, start

Enter the bin directory of the wrapper

Cd/usr/java/wrapper/bin

Start

Wrapper-c. /conf/wrapper.conf

The console will always run the code in Code-0.0.1-snapshot.jar and continue to output "start wrapper success"

Wrapper Simple to use

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.