Executing jar in Shell

Source: Internet
Author: User

The shell executes the jar program and manually configures the JDK environment that executes the jar, executing the script as:

#!/bin/shexport java_home=/home/hadoop/szw/jdk1.8.0_25 Export path= $JAVA _home/bin: $JAVA _home/jre/bin: $PATHecho ' Date ' Java-jar Stanford.jar edu.stanford.nlp.wordseg.chinesedictionary-inputdicts in.txt-output Dict.ser.szw.gzecho ' Date ' Java-jar Stanford_model.jar edu.stanford.nlp.ie.crf.crfclassifier-prop ctb.prop-serdictionary Dict.ser.szw.gz-sighancorporadict data-trainfile in.txt-serializeto newmodel.ser.szw.gz > Newmodel.log 2> Newmodel.errecho ' Date '//print time, where ' is the key above the TAB key

With this script execution is always error, ': Not a valid identifierport: ', tried a lot of ways always find the cause of the error, the last discovery is the script file format problem, need to convert this script to UNIX format, script I use notepad+ + Edit, save is default to Windows format , convert this to UNIX and perform normally.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/58/29/wKiom1SqXdHiYn3jAALuacRgbe8151.jpg "title=" Untitled. png "alt=" wkiom1sqxdhiyn3jaaluacrgbe8151.jpg "/>

This article is from the "Punk" blog, please be sure to keep this source http://yimaoqian.blog.51cto.com/1328422/1599395

Executing jar in Shell

Related Article

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.