Java console (mac osx) command line encoding, consoleosx

Source: Internet
Author: User

Java console (mac osx) command line encoding, consoleosx

Method

Vi ~ /. Bash_profile # Add a new line, UTF-8 represents your platform encoding # For example, you are GBK, GB18030 # Replace with your platform console can be real character encoding can export JAVA_TOOL_OPTIONS =-Dfile. encoding = UTF-8. ~ /. Bash_profile

Symptom

To ensure project stability, roll back from 1.8jdk to 1.6jdk

1.6jdk again java official website has no diameter can be found, but on the official website of apple can find: http://support.apple.com/kb/DL1572

The lucene version supported by 1.6jdk also needs to be downgraded to 4.6.1 and below: http://archive.apache.org/dist/lucene/java/4.6.1/

As a result, garbled characters occur during the console operation, because EUC_CN is the default jdk encoding method.

Solve the problem through the above solution;

 

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.