OpenccJavaFX is a Chinese text conversion application built with JavaFX and the FXML design pattern. It leverages the OpenccJava library to provide simplified and traditional Chinese conversion.
Download the latest version of OpenccJavaFX for your platform at Release section.
📦 These are Java builds, targeting
Java 17+.
You must have Java Runtime 17+ installed to run them.
- Chinese Conversion: Convert between simplified and traditional Chinese text.
- Regional Variant Phrases: Taiwan and Hong Kong forward variant conversion applies phrase-level exceptions before character-level variants.
- Single/Batch Conversion: Perform Chinese text conversion in single or batch mode.
- Designed to convert most text based file types and Office documents (
.docx,.xlsx,.pptx,.odt)
- JavaFX: Cross-platform Java UI framework.
- RichTextFX: Text editor for JavaFX with virtualization support.
- OpenccJava: Pure Java library for conversions between Traditional and Simplified Chinese.
- picocli: A modern framework for building powerful, user-friendly command line apps with ease.
Clone the repository:
git clone https://github.com/laisuk/OpenccJavaFX.gitNavigate to the project directory:
cd OpenccJavaFXBuild the project:
./gradlew buildRun the application:
./gradlew runThe mirrored Java API and command-line tools use one portable custom-dictionary token grammar:
<slot>:<append|override>:<path>
Slot names are case-insensitive canonical names supplied by DictSlot, for example STPhrases and
HKVariantsRev. Canonical names—not enum ordinals—are the stable external contract. Deprecated enum constants remain
available so older Java source still compiles, but they are not active and are rejected by parsing and dictionary
operations. Hyphen and underscore aliases are not accepted.
Use CustomDictSpec.parse(...) for portable string tokens and CustomDictSpec.fromFile(...) when the slot, path, and
mode are already strongly typed. Parsing validates syntax only; it does not test whether the file exists. Files are
opened when a spec is applied through DictionaryMaxlength.fromDicts(...), withCustomDicts(...), or an OpenCC
constructor.
CustomDictSpec parsed = CustomDictSpec.parse(
"STPhrases:append:C:\\dicts\\terms.txt"
);
CustomDictSpec typed = CustomDictSpec.fromFile(
DictSlot.HKVariantsRev,
Paths.get("dicts/hk-reverse.txt"),
CustomDictMode.Override
);
DictionaryMaxlength customized = DictionaryMaxlength.fromDicts(
Arrays.asList(parsed, typed)
);The CLI accepts the same grammar and permits repeated options:
openccjavacli convert -c s2t \
-D STPhrases:override:dicts/base.txt \
-D STPhrases:append:dicts/project.txtThis token format is intentionally unified across the C#, Java, Rust, and Python OpenccJava ecosystem. The Java API names above describe the implementation embedded in this project; equivalent language packages may expose the shared format through language-appropriate APIs.
Support most text base file types.
- Paste the text or open a file you wish to convert (file/text drag and drop are supported).
- Select the desired conversion configuration (e.g., Simplified to Traditional).
- Click the Start button to see the results.
Support most text base file types, Office documents (.docx, .xlsx, .pptx, .odt, .ods, .odp) and
EPUB (.epub).
- Select or drag file(s) into the source list box.
- Select the desired conversion configuration.
- Set the output folder.
- Click the Start button to begin batch conversion.
Contributions are welcome! Please fork the repository and submit a pull request for any enhancements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for details.
- OpenCC for the Chinese text conversion lexicon.
- OpenccJava for the Java Chinese conversion library.
- JavaFX for the cross-platform UI framework.
- RichTextFX for the text editor with virtualization.


