Solution to the kernel wing problem in linux-general Linux technology-Linux programming and kernel information. For details, refer to the following section. Friends who develop java in linux know that swing has some headaches in linux.
The first problem is that the conflicts between the scim input method and swing cause the keyboard to fail, especially after compiz is enabled.
There are many ways to solve this problem online, such as adding the environment variable AWT_TOOLKIT = MToolkit. This method still cannot solve the problem of keyboard failure in swing programs.
A good solution is:
Sudo cp ~ /. Scim/config/root/. scim/
Afterwards, I have never experienced a keyboard failure problem in netbeans.
The second problem is that SystemLookAndFeel cannot be used when Ubuntu uses Java to write Swing applications.
For example, when running jconsole, the following error is reported:
Some people provide an imperfect solution, that is, to change the language environment to English:
Export LANG = en
In this way, the swing application can run normally, but it is inconvenient for Chinese users and the interface becomes English. In fact, this problem occurs because swing uses systemlaf by default, but this laf is not defined in ubuntu.
A good solution is to pass the JVM runtime parameter-Dswing. systemlaf = javax. swing. plaf. metal. MetalLookAndFeel when the program starts.
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.