Oracle Java in Linux - The easy way

Submitted by gunnar on

Since Oracle Java can no longer be available in the various Linux distributions, for licensing reasons, a number of more or less complicated guides have been written about how to install Oracle Java manually. This is another such guide, but less ambitious and hopefully easier to understand and use. It only describes how to install the JRE (the Java Runtime Environment), integrate it with Firefox and create a shortcut to the Java Control Panel.

Importing site certificate into Java Runtime certificate store

Submitted by gunnar on

When your Java program attempts to connect to a server that has an invalid or self signed certificate, such as an application server in a development environment, you may get the following exception:

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

To make your Java runtime environment trust the certificate, you need to import it into the JRE certificate store.

A GUI Painter Friendly Table Component

Submitted by gunnar on

In the early days of Java, GUI forms were written, not drawn. They were created by writing code that instantiated components and added them to containers with various layout constraints. Then the program was run and the result could be admired. This way of working, WYGIWYG (what you get is what you get) was often quite fun, more often frustrating, and never very productive. Today we have a JavaBeans specification and integrated development environments (IDEs) with GUI painters.

Tags

Putting NetBeans log directory on a temporary file system

Submitted by gunnar on

Whenever you do something, anything, in NetBeans, it will write to the uigestures file in the NetBeans log directory, .netbeans/8.2/var/log for NetBeans 8.2. I finally got tired of hearing my disk being written to every time I pressed a key so I decided to put the log directory on a temporary file system in memory. I imagine this will also be good for the future health of an SSD drive.

I'm using OpenSUSE Leap so there may be variations on other distros.

Copying NetBeans GUI components in KDE and Plasma 5

Submitted by gunnar on

For some time now, it has not been possible to copy GUI components in the NetBeans GUI editor. Apparently, the KDE clipboard doesn't play well with NetBeans GUI copying. Until Plasma 5 arrived, the clipboard tray icon was provided by klipper and you could get GUI copying to work by just selecting Quit from the tray icon popup menu. Klipper was even nice enough to ask if you want it to start again automatically at next login. Of course, you didn't need to log out and log in again, you just called up krunner with Alt+F2 and typed klipper.

Using Smb4K on openSUSE 12.3 without password prompt

Submitted by gunnar on

Smb4K is my favorite tool for browsing and mounting SMB shares. Up until openSUSE 12.2 it mounted shares without prompting for the root password, through sudo rules. With openSUSE 12.2, this did not work out of the box anymore. The following post by Alexander Reinholdt helped me with the local policy override settings needed:

Root's password required every (u-) mount

Adding dictionary for Thunderbird in OpenSUSE 12.2

Submitted by gunnar on

After installing Thunderbird I found that although I had installed myspell-swedish from the package repositiory I didn't get Swedish as an option in Thunderbird. I checked the file list for the thunderbird package and it showed a directory called /usr/lib64/thunderbird/dictionaries. This directory contained symbolic links to /usr/share/myspell/en_US.aff and /usr/share/myspell/en_US.dic but not to the files for Swedish. Perhaps it would if I had installed the dictionary before thunderbird, don't know.