Mac OS X Java-based programs (such as IntelliJ idea, jEdit, etc.) will appear invalid Chinese punctuation input, in the Chinese input method state, you can enter the Chinese characters, but the input punctuation at the end of the English punctuation. Read the relevant information, originally this is Java's own bug. This bug has occurred since the Java 8u51 version, and until now the latest Java 8u72 is still the case, but the old version of Java 8u45 does not have this problem. So, you can take a workaround on Mac OS X with an older version of the JDK 8u45, without affecting the new version of the JDK that has been installed. Then, make minor changes to the Java-based program, as follows:
1, for IntelliJ idea, Appcode, webstorm modification
Take idea as an example, enter the/applications/intellij idea.app/contents/jre directory and execute the following command:
$ mv JDK Jdk.backup
$ ln-s/library/java/javavirtualmachines/jdk1.8.0_45.jdk JDK
Restart idea, and typing Chinese punctuation is normal. The same is true of the Appcode and webstorm changes.
2, for the modification of JEdit, there are two ways
(1) Method one:
Download a generic startup script for Java-based programs in MAC OS X Environment, the official address is https://github.com/tofi86/universalJavaApplicationStub, this script can be freely modified by you Java Program startup details, and can support Mac OS X program wrapper configuration files, such as Info.plist and so on. Copy the script universaljavaapplicationstub to the/applications/jedit.app/contents/macos directory, and then go to this directory and execute the following command:
$ mv JEdit Jedit.backup
$ mv Universaljavaapplicationstub JEdit
$ VI JEdit
Define the internal environment variable java_home=/library/java/javavirtualmachines/jdk1.8.0_45.jdk/contents/home inside, and find the command code that actually starts JAVA behind the script, Set the internal environment variable Jvmclasspath=${oraclejavafolder}/jedit.jar, exit after saving, restart JEdit.
(2) Method two:
Execute the following command:
$ cd/applications/jedit.app/contents
$ mkdir Plugins
$ ln-s/LIBRARY/JAVA/JAVAVIRTUALMACHINES/JDK1.8.0_45.JDK jdk8
To modify the Info.plist file, add the following key-value pairs:
<key>JVMRuntime</key>
<string>jdk8</string>
Exit after saving and restart JEdit.
Solution for Mac OS X under IntelliJ idea, JEdit and other Java programs Chinese punctuation input Invalid method