- Настройка языковых настроек java
- Установка Java в Linux
- Чем отличается JDK от JRE
- Установка Java в Linux своими руками
- Установка Java в Ubuntu
- JRE и JDK
- Установка Java в ArchLinux
- Установка Java в CentOS
- Выбор версии Java
- Ubuntu
- ArchLinux
- CentOS
- Настройка переменных окружения
- Выводы
- User language java linux
- JDK 8 and JRE 8 Supported Locales
- Installer and Supported Languages
- Enabled Locales for java.util and java.text Functionality
- Numbering Systems
- Locales available from other Providers
- Enabled Writing Systems for Java Foundation Classes and JavaFX
- Overview
- Supported Writing Systems
- Text Input
- Text Rendering
- Drag and Drop
- User Interface Translation
Настройка языковых настроек java
Когда я использую стандартную java-локаль на моей машине Linux, она выдается с настройками локали в США, где я могу изменить это так, чтобы она выходила с правильной локалью?
Я верю, что Java отображает это из переменных среды, в которых он был запущен, поэтому вам нужно убедиться, что переменные среды LANG и LC_ * установлены соответствующим образом.
В локали manpage содержится полная информация об указанных переменных среды.
С свойствами user.language , user.country и user.variant .
java -Duser.language=th -Duser.country=TH -Duser.variant=TH SomeClass
Мне пришлось управлять этим в script, который запускался на машине с французской локалью, но определенную программу Java пришлось запускать с en_US. Как уже отмечалось, следующие работы:
В качестве альтернативы
Я предпочитаю последний.
Вы можете вызывать во время init или независимо Locale.setDefault() или -Duser.language =, -Duser.country = и -Duser.variant = в командной строке. Здесь что-то на сайте Sun.
Для таких инструментов, как jarsigner , который реализован на Java.
Вы можете изменить на консоли:
Если вы находитесь на Mac, просто используя Системные настройки → Языки и перетаскивая язык для тестирования вверх (до английского), убедитесь, что в следующий раз, когда вы откроете приложение, будет проверен правильный язык!
В linux создайте файл в /etc/default/locale со следующим содержимым
а затем используйте команду source для экспорта этой переменной, запустив
Команда источника постоянно устанавливает переменную.
Источник
Установка Java в Linux
В этой статье речь пойдёт о проприетарной версии Java. Часто происходят ситуации, когда пользователь пытается открыть какую-либо программу на Java, а она либо вообще не запускается, либо пытается это сделать с помощью OpenJDK (Java Development Kit). Но вместо результата вы получаете кучу ошибок (как например с Minecraft). В данных ситуациях вам, скорее всего, поможет установка Java от Oracle.
Я вам расскажу, как установить JRE (Java Runtime Environment) и JDK (Java Development Kit) 8 версии на такие дистрибутивы, как Ubuntu, CentOS и Arch, а также как выбрать нужную среду по умолчанию.
Чем отличается JDK от JRE
- JRE — Java Runtime Environment — это среда выполнения Java. Предназначена для обычного использования. Позволяет запускать приложения, написанные на языке Java.
- JDK— Java Development Kit — стандартная версия платформы Java, предназначенная для разработки. Это специальный пакет разработчика, в который входят документация, различные утилиты, компилятор, библиотеки классов, а также сама JRE.
Установка Java в Linux своими руками
Скачать архив с необходимой вам версией вы можете с официального сайта. Далее вам надо перенести его в желаемую директорию и распаковать. Рекомендую /opt/java, далее она и будет использоваться. Сделайте это, используя следующие команды:
sudo tar -xzf /opt/java/jre*.tar.gz
Где «*» — версия Java.
Загрузите архив со средствами разработчки с официального сайта компании Oracle. Также перенесите его в желаемую директорию и распакуйте:
sudo tar -xzf /opt/java/jdk*.tar.gz
Установка Java в Ubuntu
JRE и JDK
Для установки проприетарной Oracle Java вам необходимо добавить репозиторий, обновить индексы пакетов и установить Java. В Ubuntu, начиная с 18 релиза, это делается автоматически после добавления репозитория.
Внимание! Будут установлены как JRE, так и JDK. Сначала добавим репозиторий и обновим списки пакетов:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
В процессе установки необходимо будет принять лицензионное соглашение:
sudo apt-get install oracle-java8-installer
Установка Java в ArchLinux
В официальных репозиториях есть только OpenJDK. Поэтому придётся воспользоваться пакетом из AUR(вы можете, конечно, руками установить Java от Oracle, но AUR проще). Установка производится всего одной командой:
JDK так же можно установить, используя AUR. Просто выполните команду:
Установка Java в CentOS
Для RHEL, Fedora, Cent OS, OpenSUSE есть официальный RPM-пакет, который вы можете скачать с официального сайта. Чтобы установить пакет из терминала, воспользуйтесь этой командой:
sudo rpm -i /путь/к/файлу/jre-*.rpm
где «*» — версия Java. Или же примените любую графическую утилиту.
Средства для разработчика вы можете скачать на сайте Oracle, ссылка на который есть в верху статьи. Для установки из терминала, используйте команду:
Где «*» — версия Java. «
» — указывает, что путь начинается.
Выбор версии Java
Ubuntu
Для переключения на 8 версию Java используйте следующую команду:
sudo update-java-alternatives -s java-8-oracle
Чтобы автоматически установить переменные среды, воспользуйтесь командой:
sudo apt-get install oracle-java8-set-default
Или же вы можете установить альтернативы сами. Делается это с помощью следующих команд:
sudo update-alternatives —install /usr/bin/java java / usr / lib / jvm / java-8-oracle/bin/java 1
sudo update-alternatives —install / usr / bin / javaс javaс / usr / lib / jvm / java-8-oracle / bin / javaс 1
sudo update-alternatives —install / usr / bin / javaws javaws / usr / lib / jvm /java-8-oracle / bin / javaws 1
Теперь осталось выбрать версии исполняемых файлов java, javaws и javac, которые будут использоваться по умолчанию:
sudo update-alternatives —config java
sudo update-alternatives —config javac
sudo update-alternatives —config javaws
ArchLinux
Для начала просмотрите список установленных сред:
Затем установите необходимую вам:
archlinux-java set имя_среды
archlinux-java set java-8-jre/jre
CentOS
Выбрать необходимую среду можно с помощью команд, данных ниже (так же, как и в Ubuntu). Вам нужно будет просто выбрать цифру, соответствующую номеру версии:
sudo update-alternatives —config java
sudo update-alternatives —config javac
sudo update-alternatives —config javaws
Настройка переменных окружения
Чтобы настройки были доступны для всех пользователей, будем использовать файл /etc/profile. Откройте его для редактирования любым текстовым редактором с помощью команды sudo и добавьте в конец следующие строки:
- export JAVA_HOME=/opt/java/jdk*/
- export JRE_HOME=/opt/java/jdk*/jre
- export PATH=$PATH:/opt/java/jdk*/bin:/opt/java/jdk*/jre/bin
- Вместо пути по умолчанию /opt/java укажите тот, который использовали;
- Если вы используете не JDK, а JRE, то в пути у вас так же будет не «jdk*», а «jre*»;
- «*» — версия Java, которая у вас установлена.
Выводы
В данной статье мы подробно разобрали процесс установки и настройки Java в различных дистрибутивах Linux. Если остались вопросы, спрашивайте в комментариях!
Источник
User language java linux
Your search did not match any results.
We suggest you try the following to help find what you’re looking for:
- Check the spelling of your keyword search.
- Use synonyms for the keyword you typed, for example, try “application” instead of “software.”
- Try one of the popular searches shown below.
- Start a new search.
JDK 8 and JRE 8 Supported Locales
The set of supported locales varies between different implementations of the Java Platform Standard Edition (Java SE) as well as between different areas of functionality.
This page documents locale support in Oracle’s Java SE Development Kit 8 (JDK) and Java SE Runtime Environment 8 (JRE).
Installer and Supported Languages
The JRE and JDK Installers are localized to the languages specified in the User Interface Translation table. The installers will use the use the system’s default locale setting to determine which of the supported languages to use at the time of installation. If the system’s default locale is not supported by the installer, the installer will be displayed in English.
The complete international version of the JRE is installed.
Enabled Locales for java.util and java.text Functionality
The support for locale-sensitive behavior in the java.util and java.text packages is almost entirely platform independent, so all locales are supported in the same way and simultaneously, independent of the host operating system and its localization. The only platform dependent functionality is the setting of the initial default locale and the initial default time zone based on the host operating system’s locale and time zone.
Oracle’s JDK 8 and the JRE 8 support all the locales shown below.
Supported Locales
Language (ISO 639) | Country (ISO 3166) | Variant | Script (ISO 15924) | Language Tag | Note |
---|---|---|---|---|---|
Albanian (sq) | Albania (AL) | (Latn) | sq-AL | ||
Arabic (ar) | Algeria (DZ) | (Arab) | ar-DZ | ||
Arabic (ar) | Bahrain (BH) | (Arab) | ar-BH | ||
Arabic (ar) | Egypt (EG) | (Arab) | ar-EG | ||
Arabic (ar) | Iraq (IQ) | (Arab) | ar-IQ | ||
Arabic (ar) | Jordan (JO) | (Arab) | ar-JO | ||
Arabic (ar) | Kuwait (KW) | (Arab) | ar-KW | ||
Arabic (ar) | Lebanon (LB) | (Arab) | ar-LB | ||
Arabic (ar) | Libya (LY) | (Arab) | ar-LY | ||
Arabic (ar) | Morocco (MA) | (Arab) | ar-MA | ||
Arabic (ar) | Oman (OM) | (Arab) | ar-OM | ||
Arabic (ar) | Qatar (QA) | (Arab) | ar-QA | ||
Arabic (ar) | Saudi Arabia (SA) | (Arab) | ar-SA | ||
Arabic (ar) | Sudan (SD) | (Arab) | ar-SD | ||
Arabic (ar) | Syria (SY) | (Arab) | ar-SY | ||
Arabic (ar) | Tunisia (TN) | (Arab) | ar-TN | ||
Arabic (ar) | United Arab Emirates (AE) | (Arab) | ar-AE | ||
Arabic (ar) | Yemen (YE) | (Arab) | ar-YE | ||
Belarusian (be) | Belarus (BY) | (Cyrl) | be-BY | ||
Bulgarian (bg) | Bulgaria (BG) | (Cyrl) | bg-BG | ||
Catalan (ca) | Spain (ES) | (Latn) | ca-ES | ||
Chinese (zh) | China (CN) | (Hans) | zh-CN | ||
Chinese (zh) | Singapore (SG) | (Hans) | zh-SG(*) | ||
Chinese (zh) | Hong Kong (HK) | (Hant) | zh-HK | ||
Chinese (zh) | Taiwan (TW) | (Hant) | zh-TW | ||
Croatian (hr) | Croatia (HR) | (Latn) | hr-HR | ||
Czech (cs) | Czech Republic (CZ) | (Latn) | cs-CZ | ||
Danish (da) | Denmark (DK) | (Latn) | da-DK | ||
Dutch (nl) | Belgium (BE) | (Latn) | nl-BE | ||
Dutch (nl) | Netherlands (NL) | (Latn) | nl-NL | ||
English (en) | Australia (AU) | (Latn) | en-AU | ||
English (en) | Canada (CA) | (Latn) | en-CA | ||
English (en) | India (IN) | (Latn) | en-IN | ||
English (en) | Ireland (IE) | (Latn) | en-IE | ||
English (en) | Malta (MT) | (Latn) | en-MT(*) | ||
English (en) | New Zealand (NZ) | (Latn) | en-NZ | ||
English (en) | Philippines (PH) | (Latn) | en-PH(*) | ||
English (en) | Singapore (SG) | (Latn) | en-SG(*) | ||
English (en) | South Africa (ZA) | (Latn) | en-ZA | ||
English (en) | United Kingdom (GB) | (Latn) | en-GB | ||
English (en) | United States (US) | (Latn) | en-US | ||
Estonian (et) | Estonia (EE) | (Latn) | et-EE | ||
Finnish (fi) | Finland (FI) | (Latn) | fi-FI | ||
French (fr) | Belgium (BE) | (Latn) | fr-BE | ||
French (fr) | Canada (CA) | (Latn) | fr-CA | ||
French (fr) | France (FR) | (Latn) | fr-FR | ||
French (fr) | Luxembourg (LU) | (Latn) | fr-LU | ||
French (fr) | Switzerland (CH) | (Latn) | fr-CH | ||
German (de) | Austria (AT) | (Latn) | de-AT | ||
German (de) | Germany (DE) | (Latn) | de-DE | ||
German (de) | Luxembourg (LU) | (Latn) | de-LU | ||
German (de) | Switzerland (CH) | (Latn) | de-CH | ||
Greek (el) | Cyprus (CY) | (Grek) | el-CY(*) | ||
Greek (el) | Greece (GR) | (Grek) | el-GR | ||
Hebrew (iw) | Israel (IL) | (Hebr) | iw-IL | ||
Hindi (hi) | India (IN) | (Deva) | hi-IN | Implicitly specifies the Devanagari numbering system. | |
Hungarian (hu) | Hungary (HU) | (Latn) | hu-HU | ||
Icelandic (is) | Iceland (IS) | (Latn) | is-IS | ||
Indonesian (in) | Indonesia (ID) | (Latn) | in-ID(*) | ||
Irish (ga) | Ireland (IE) | (Latn) | ga-IE(*) | ||
Italian (it) | Italy (IT) | (Latn) | it-IT | ||
Italian (it) | Switzerland (CH) | (Latn) | it-CH | ||
Japanese (ja) | Japan (JP) | (Jpan) | ja-JP | ||
Japanese (ja) | Japan (JP) | * | (Jpan) | ja-JP-u-ca-japanese | Explicitly specifies the Japanese imperial calendar with java.util.Calendar. |
Japanese (ja) | Japan (JP) | JP | (Jpan) | ja-JP-x-lvariant-JP | Explicitly specifies the Japanese imperial calendar with java.util.Calendar. (For compatibility) |
Korean (ko) | South Korea (KR) | (Kore) | ko-KR | ||
Latvian (lv) | Latvia (LV) | (Latn) | lv-LV | ||
Lithuanian (lt) | Lithuania (LT) | (Latn) | lt-LT | ||
Macedonian (mk) | Macedonia (MK) | (Cyrl) | mk-MK | ||
Malay (ms) | Malaysia (MY) | (Latn) | ms-MY(*) | ||
Maltese (mt) | Malta (MT) | (Latn) | mt-MT(*) | ||
Norwegian (no) | Norway (NO) | (Latn) | no-NO | “no” is treated as Norwegian Bokmål. | |
Norwegian Bokmål (nb) | Norway (NO) | (Latn) | nb-NO | ||
Norwegian Nynorsk (nn) | Norway (NO) | (Latn) | nn-NO | ||
Norwegian (no) | Norway (NO) | NY | (Latn) | no-NO-x-lvariant-NY | “no” is treated as Norwegian Nynorsk. (For compatibility) |
Polish (pl) | Poland (PL) | (Latn) | pl-PL | ||
Portuguese (pt) | Brazil (BR) | (Latn) | pt-BR(***) | ||
Portuguese (pt) | Portugal (PT) | (Latn) | pt-PT(***) | ||
Romanian (ro) | Romania (RO) | (Latn) | ro-RO | ||
Russian (ru) | Russia (RU) | (Cyrl) | ru-RU | ||
Serbian (sr) | Bosnia and Herzegovina (BA) | (Cyrl) | sr-BA(*) | ||
Serbian (sr) | Montenegro (ME) | (Cyrl) | sr-ME(*) | ||
Serbian (sr) | Serbia (RS) | (Cyrl) | sr-RS(*) | ||
Serbian (sr) | Bosnia and Herzegovina (BA) | Latn | sr-Latn-BA(**) | ||
Serbian (sr) | Montenegro (ME) | Latn | sr-Latn-ME(**) | ||
Serbian (sr) | Serbia (RS) | Latn | sr-Latn-RS(**) | ||
Slovak (sk) | Slovakia (SK) | (Latn) | sk-SK | ||
Slovenian (sl) | Slovenia (SI) | (Latn) | sl-SI | ||
Spanish (es) | Argentina (AR) | (Latn) | es-AR | ||
Spanish (es) | Bolivia (BO) | (Latn) | es-BO | ||
Spanish (es) | Chile (CL) | (Latn) | es-CL | ||
Spanish (es) | Colombia (CO) | (Latn) | es-CO | ||
Spanish (es) | Costa Rica (CR) | (Latn) | es-CR | ||
Spanish (es) | Dominican Republic (DO) | (Latn) | es-DO | ||
Spanish (es) | Ecuador (EC) | (Latn) | es-EC | ||
Spanish (es) | El Salvador (SV) | (Latn) | es-SV | ||
Spanish (es) | Guatemala (GT) | (Latn) | es-GT | ||
Spanish (es) | Honduras (HN) | (Latn) | es-HN | ||
Spanish (es) | Mexico (MX) | (Latn) | es-MX | ||
Spanish (es) | Nicaragua (NL) | (Latn) | es-NI | ||
Spanish (es) | Panama (PA) | (Latn) | es-PA | ||
Spanish (es) | Paraguay (PY) | (Latn) | es-PY | ||
Spanish (es) | Peru (PE) | (Latn) | es-PE | ||
Spanish (es) | Puerto Rico (PR) | (Latn) | es-PR | ||
Spanish (es) | Spain (ES) | (Latn) | es-ES | ||
Spanish (es) | United States (US) | (Latn) | es-US(*) | ||
Spanish (es) | Uruguay (UY) | (Latn) | es-UY | ||
Spanish (es) | Venezuela (VE) | (Latn) | es-VE | ||
Swedish (sv) | Sweden (SE) | (Latn) | sv-SE | ||
Thai (th) | Thailand (TH) | (Thai) | th-TH | Implicitly specifies the Latin numbering system and the Thai Buddhist calendar with java.util.Calendar. | |
Thai (th) | Thailand (TH) | * | (Thai) | th-TH-u-ca-buddhist | Implicitly specifies the Latin numbering system. Explicitly specifies the Thai Buddhist calendar with java.util.Calendar. |
Thai (th) | Thailand (TH) | * | (Thai) | th-TH-u-ca-buddhist-nu-thai | Explicitly specifies the Thai numbering system and the Thai Buddhist calendar with java.util.Calendar. |
Thai (th) | Thailand (TH) | TH | (Thai) | th-TH-x-lvariant-TH | Explicitly specifies the Thai numbering system and the Thai Buddhist calendar with java.util.Calendar. (For compatibility) |
Turkish (tr) | Turkey (TR) | (Latn) | tr-TR | ||
Ukrainian (uk) | Ukraine (UA) | (Cyrl) | uk-UA | ||
Vietnamese (vi) | Vietnam (VN) | (Latn) | vi-VN |
(*) Data for these locales are derived from the Unicode Consortium’s Common Locale Data Repository release 1.4.1 on an «AS-IS» basis.
(**) Data for these locales are derived from the Unicode Consortium’s Common Locale Data Repository release 1.9 on an «AS-IS» basis.
(***) Data for these locales are derived from the Unicode Consortium’s Common Locale Data Repository release 21.0.1 on an «AS-IS» basis.
Implicit default scripts are in parentheses. They are not returned from the Locale.getScript() method.
Locales can be constructed with Locale.forLanguageTag( ) or Locale( , [, ]) where is the Language Tag column value, is the ISO 639 value, is the ISO 3166 value, and is the Variant column value if it’s neither empty nor *.
Locales can be constructed only with Locale.forLanguageTag( ) if the Variant column value is *.
Numbering Systems
Numbering systems can be specified by a language tag with a numbering system ID, such as th-TH-u-nu-thai. The following are the available numbering system IDs for specifying a numbering system. No algorithmic numbering systems defined in Unicode Locale Data Markup Language (LDML) are supported.
Numbering System ID | Numbering System | Digit Zero Value |
---|---|---|
arab | Arabic-Indic Digits | \u0660 |
arabext | Extended Arabic-Indic Digits | \u06f0 |
bali | Balinese Digits | \u1b50 |
beng | Bengali Digits | \u09e6 |
cham | Cham Digits | \uaa50 |
deva | Devanagari Digits | \u0996 |
fullwide | Full Width Digits | \uff10 |
gujr | Gujarati Digits | \u0ae6 |
guru | Gurmukhi Digits | \u0a66 |
java | Javanese Digits | \ua9d0 |
kali | Kayah Li Digits | \ua900 |
khmr | Khmer Digits | \u17e0 |
knda | Kannada Digits | \u0ce0 |
lana | Tai Tham Hora Digits | \u1a80 |
lanatham | Tai Tham Tham Digits | \u1a90 |
laoo | Lao Digits | \u0ed0 |
latn | Western Digits | \u0030 |
lepc | Lepcha Digits | \u1c40 |
limb | Limbu Digits | \u1946 |
mlym | Malayalam Digits | \u0d66 |
mong | Mongolian Digits | \u1810 |
mtei | Meetei Mayek Digits | \uabf0 |
mymr | Myanmar Digits | \u1040 |
mymrshan | Myanmar Shan Digits | \u1090 |
nkoo | N’Ko Digits | \u07c0 |
olck | Ol Chiki Digits | \u1c50 |
orya | Oriya Digits | \u0b66 |
saur | Saurashtra Digits | \ua8d0 |
sund | Sundanese Digits | \u1bb0 |
talu | Telugu Digits | \u19d0 |
tamldec | Tamil Digits | \u0be6 |
telu | Telugu Digits | \u0c66 |
thai | Thai Digits | \u0e50 |
tibt | Tibetan Digits | \u0f20 |
vaii | Vai Digits | \ua620 |
Locales available from other Providers
In addition to the locales that Oracle’s JDK 8 and the JRE 8 provide by default, which is represented by “JRE” as the locale provider name, locales from other locale providers can be used. They can be enabled through “java.locale.providers” system property. Refer to java.util.spi.LocaleServiceProvider class’ class description for more detail. Oracle’s JDK 8 and the JRE 8 bundle two extra locale providers as follows:
CLDR: CLDR locales based on the Unicode Consortium’s CLDR release 21.0.1. BreakIterator and Collator data are not adopted.
HOST: This provider enables the default locale(s) (Locale.Category.FORMAT and/or Locale.Category.DISPLAY) utilizing the underlying operating system. This provider is available on Windows platform and Mac OS X platform.
The default “JRE” locale provider’s resources for the Locale.ROOT locale are used if none of the specified locale providers support the requested locale. For example, if only “CLDR” is specified in “java.locale.providers” system property, Collator works as if requested for the ROOT locale because “CLDR” locale provider does not provide Collator locale data. Specifying “CLDR,JRE” supplements the “JRE” locale provider’s Collator functionality, as well as preferring “CLDR” locale provider’s other locale data to “JRE”’s ones.
Enabled Writing Systems for Java Foundation Classes and JavaFX
Overview
For the Java Foundation Classes (AWT, Swing, 2D, input method framework, drag and drop) and JavaFX, locales can generally be characterized by just the writing system; there are no country or language specific distinctions. Writing system support in the JFC/JavaFX depends to some extent on the host operating system, and full support for simultaneous use of multiple languages is not always possible.
We consider a writing system supported by JFC/JavaFX if all functionality provided by JFC/JavaFX works adequately for this writing system in the following situations:
- On Windows Vista, 7, and 8, when running on a Windows system with UI Language set to a language using that writing system.
- On Solaris and Linux, when running on a host operating system with the locale set to one using that writing system and one of the encodings shown for that writing system in the table below.
- On Mac OS X, when running with the Language set to one using that writing system and one of the encodings shown for that writing system in the table below.
Oracle’s JDK 8 and the JRE 8 support all writing systems shown below. Peered AWT components are only supported for a subset of the writing systems — see the last column.
Details on various areas of functionality are provided in the sections below.
Supported Writing Systems
Writing System | Languages | Windows Encodings | Solaris Encodings | Linux Encodings | Mac OS X Encodings | Peered AWT Components |
---|---|---|---|---|---|---|
Arabic | Arabic | 1256 | 8859-6, |
(1) eucJP on Solaris supports the JIS character sets X 0201, X 0208, and X 0212.
Text Input
Support for text input consists of two parts: interpretation of keyboard layouts, and text composition using input methods. For interpretation of keyboard layouts, the JDK relies entirely on the host operating system. For text composition using input methods, JDK supports native input methods using the host operating system’s input method manager as well as input methods developed in the Java programming language (excluding JavaFX environment).
Locale support in input methods implemented in the Java programming language depends solely on the set of installed input methods, not on the host operating system and its localization. However, support for the use of input methods implemented in the Java programming language with peered components is implementation dependent — see below.
Support for keyboard layouts and and native input methods varies between platforms.
Windows
On Windows Vista, 7, and 8, the JRE supports use of any keyboard layout or IMM-based input method.
Input methods implemented in the Java programming language are supported in all components but JavaFX nodes, on all versions of Windows.
Solaris and Linux
The JRE supports use of any keyboard layout or input method that can be used with a particular Solaris or Linux locale.
Input methods implemented in the Java programming language are supported in lightweight components (such as Swing text components), but not in peered components (such as AWT text components) or JavaFX nodes.
Mac OS X
The JRE supports use of any input source.
Input methods implemented in the Java programming language are supported in lightweight components (such as Swing text components), but not in peered components (such as AWT text components) or JavaFX nodes.
Text Rendering
Applications have two options for selecting fonts:
- Using the logical font names Serif, SansSerif, Dialog, DialogInput, Monospaced.
- Using a physical font, requesting it by name.
Text Rendering in Lightweight Components
When using logical font names, text in at least the writing system of the host locale and the Western European subset of the Latin writing system is supported.
When using physical fonts, we need to distinguish between simple and complex writing systems. Simple writing systems have a one-to-one mapping from characters to glyphs, and glyphs are placed on the baseline continuously from left to right. Complex writing systems may use different glyphs for the same character based on context, may form ligatures, may be written from right to left, and may reorder glyphs during line layout, or may have other rules for placing glyphs (in particular for combining marks).
The 2D text rendering system supports any combination of simple writing systems and the complex writing systems listed in the table above. Within these limitations, the range of supported writing systems is determined by the font. A single TrueType font might provide glyphs covering the entire Unicode character set and a Unicode based character-to-glyph mapping. Given such a font, 2D can support all simple writing systems as well as the complex writing systems shown in the table above. Other complex writing systems are not supported.
Text Rendering in JavaFX
No precise list of supported font rendering locales can be provided since support is largely dependent on the installed platform fonts, and the complex text rendering capabilities of the native platform. However in general this means the capabilities of JavaFX should be similar to those of the platform itself, and for the supported modern desktop platforms this should match or exceed those of the equivalent JFC/Swing text rendering.
The automatic implicit addition of fallback fonts to all FX fonts other than application embedded fonts means that the application should benefit from the broadest locale support no matter which FX font is in use.
Text Rendering in Peered Components
When using logical font names, text in at least the writing system of the host operating system’s locale is supported.
Physical fonts are not supported in peered components.
Text Rendering in Printing
There are three printing APIs:
- The 2D printing API, using the java.awt.print.PrinterJob.getPrinterJob method.
- The AWT printing API, using the java.awt.Toolkit.getPrintJob method.
- The pluggable services printing API, using the javax.print package.
Text rendering using the AWT and 2D printing API works to the same extent as text rendering on the screen. Text rendering using the pluggable services printing API depends on the printing service used; the services provided by the JRE work to the same extent as text rendering on the screen.
Drag and Drop
On Windows Vista, 7, and 8, text using the entire Unicode character set can be transferred between applications.
On Solaris and Linux, text in the character encoding of the host operating system’s locale can be transferred between applications.
Applications that need to transfer arbitrary text independent of the host operating system, can do so using serialization: Create a Transferable which supports only one flavor: DataFlavor.stringFlavor. This flavor represents the serialized representation of a String. Make sure that the target supports stringFlavor as well. When the transfer occurs, the AWT will serialize out the String on one end and deserialize on the other. This is much slower than a native platform text transfer, but it will succeed where native transfers may not.
User Interface Translation
The user interface elements provided by the JRE 8, include Swing dialogs, messages written by the runtime environment to the standard output and standard error streams, as well as messages produced by the tools provided with the JRE. These languages are also supported in JavaFX. These user interface elements are localized into the following languages:
Language | Locale ID |
---|---|
Chinese (Simplified) | zh_CN |
Chinese (Traditional) | zh_TW |
English | en |
French | fr |
German | de |
Italian | it |
Japanese | ja |
Korean | ko |
Portuguese (Brazilian) | pt_BR |
Spanish | es |
Swedish | sv |
The user interface elements provided by the JDK 8, include messages produced by the tools that are only part of the JDK in addition to the elements provided by the JRE. These languages are also supported in JavaFX. The additional user interface elements are localized into the following languages:
Источник