Hot questions for Using Ubuntu in openjdk

Question:

So I just installed Ubuntu, and this is my first time working in a Linux environment, so bear with my noobishness here.

Anyway, I downloaded the Java 8 JDK directly from Oracle, but I understand there's also an OpenJDK for Java 8 as well. I have two questions.

  1. What is the difference between the Oracle version and OpenJDK. Pros/Cons?

  2. When I try and get OpenJDK 8, I can't. I'm pasting the terminal command and the error message I get here, hoping for advice. Again, very new to Linux, been on my first Linux distro ever for less than an hour here at this point.

    user@computer:~/Java$ sudo apt-get install openjdk-8-jdk
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    E: Unable to locate package openjdk-8-jdk
    

Any help would be appreciated. In the meantime, I'm just gonna use the Oracle package. Thanks.

Edit:

So, now I have a new problem. I installed OpenJDK 7, it came with Maven and just installed before I realized I was getting a two-for-one deal. Now I have JDK 7, and Eclipse, and Maven, and they're all working, but I'm stuck on JDK 7 rather than 8.

I saw that there's a link below, I intend to check it out in the morning, it's 2am and I'm tired right now. Any other advice for this new issue would be appreciated, otherwise I will definitely be checking out that link first thing in the morning.


Answer:

UPDATE: installation without root privileges below


I advise you to not install packages manually on ubuntu system if there is already a (semi-official) repository able to solve your problem. Further, use Oracle JDK for development, just to avoid (very sporadic) compatibility issues (i've tried many years ago, it's surely better now).

Add the webupd8 repo to your system:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update

Install your preferred version of jdk (versions from java-6 to java-9 available):

sudo apt-get install oracle-java8-installer

You can also install multiple version of jdk, mixing openjdk and oracle versions. Then you can use the command update-java-alternatives to switch between installed version:

# list available jdk
update-java-alternatives --list

# use jdk7
sudo update-java-alternatives --set java-7-oracle

# use jdk8
sudo update-java-alternatives --set java-8-oracle

Requirements

If you get add-apt-repository: command not found be sure to have software-properties-common installed:

sudo apt-get install software-properties-common

If you're using an older version Ubuntu:

sudo apt-get install python-software-properties

JDK installation without root privileges

If you haven't administrator rights on your target machine your simplest bet is to use sdkman to install the zulu certified openjdk:

curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk install java

NOTE: sdkman allow to install also the official Oracle JDK, although it's not a the default option. View available versions with:

sdk ls java

Install the chosen version with:

sdk install java <version>

For example:

sdk install java 9.0.1-oracle

Glossary of commands

  • sudo <command> [command_arguments]: execute a command with the superuser privilege.

  • add-apt-repository <PPA_id>: Ubuntu (just like every Debian derivatives and generally speaking every Linux distribution) has a main repository of packages that handle things like package dependencies and updating. In Ubuntu is possible to extend the main repository using a PPA (Personal Package Archive) that usually contains packages not available in the system (just like oracle jdk) or updated versions of available ones (example: LibreOffice 5 in LTS is available only through this PPA).

  • apt-get [install|update|upgrade|purge|...]: it's "the" command-line package handler used to manipulate the state of every repository on the system (installing / updating / upgrading can be viewed as an alteration of the repository current state).

In our case: with the command sudo add-apt-repository ppa:webupd8team/java we inform the system that the next repository update must retrieve packages information also from webupd8 repo.

With sudo apt-get update we actually update the system repository (all this operations requires superuser privileges, so we prepend sudo to the commands).

sudo apt-get install oracle-java8-installer

  • update-java-alternatives (a specific java version of update-alternatives): in Ubuntu several packages provides the same functionality (browse the internet, compile mails, edit a text file or provides java/javac executables...). To allows the system to choose the user favourites tool given a specific task a mechanism using symlinks under /etc/alternatives/ is used. Try to update the jdk as indicated above (switch between java 7 and java 8) and view how change the output of this command:

    ls -l /etc/alternatives/java*

In our case: sudo update-java-alternatives --set java-8-oracle update symlinks under /etc/alternatives to point to java-8-oracle executables.

Extras:

  • man <command>: start using man to read a really well written and detailed help on (almost) every shell command and its options (every command i mention in this little answer has a man page, try man update-java-alternatives).

  • apt-cache search <search_key>: query the APT cache to search for a package related with the search_key provided (can be the package name or some word in package description).

  • apt-cache show <package>: provides APT information for a specific package (package version, installed or not, description).

Question:

I'm trying to install OpenJDK8 in a docker ubuntu container but i'm still receiving this error:

(gconftool-2:4389): GConf-WARNING **: 
Client failed to connect to the D-BUS daemon:
Unable to autolaunch a dbus-daemon without a $DISPLAY for X11

How can i solve this error?


Answer:

You could set the DISPLAY variable to a X server (the one on your host for example), but installing openjdk 8 can be done without an X server. You can take the official java:openjdk-8 image as an example of how to do that, its Dockerfile is here : https://github.com/docker-library/openjdk/blob/master/8-jdk/Dockerfile

Question:


Answer:

Eclipse support for Java 8 was from Kepler (4.3). You may need to move newer version of eclipse than your current version(3.8).

(update from Elliott Frisch )

Luna is the version after Kepler, and supports java 8 out of the box. See https://wiki.eclipse.org/JDT_Core/Java8

Question:

I am trying to execute the WindRiver workbench on my host. However, it crashed and the log file as shown in the following.

The java version currently installed on my computer:

java version "1.7.0_79"
OpenJDK Runtime Environment (IcedTea 2.5.5) (7u79-2.5.5-0ubuntu0.14.04.2)
OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)

I suspect this is caused by the version of Java.

Please let me know if you know how to fix it

ON 2015-08-25 18:56:33.830 -----------------------------------------------
eclipse.buildId=M20130131-0800/WB20141023-0742
java.version=1.6.0_21
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Command-line arguments:  -os linux -ws gtk -arch x86

!ENTRY org.eclipse.osgi 4 0 2015-08-25 18:57:02.301
!MESSAGE Application error
!STACK 1
java.lang.UnsatisfiedLinkError: com.windriver.core.runtime.jni.Env.setEnv(Ljava/lang/String;Ljava/lang/String;)I
    at com.windriver.core.runtime.jni.Env.setEnv(Native Method)
    at com.windriver.ide.common.core.installregistry.WREnv.setSystemEnv(WREnv.java:805)
    at com.windriver.ide.common.core.installregistry.WRInstallRegistry.initWorkbenchEnvironment(WRInstallRegistry.java:631)
    at com.windriver.ide.common.core.installregistry.WRInstallRegistry.init(WRInstallRegistry.java:484)
    at com.windriver.ide.common.core.installregistry.WRInstallRegistry.getInstance(WRInstallRegistry.java:550)
    at com.windriver.ide.application.UnifiedSWTSwingApplication.checkPreconditions(UnifiedSWTSwingApplication.java:148)
    at com.windriver.ide.application.CopyOfIDEApplication.start(CopyOfIDEApplication.java:136)
    at com.windriver.ide.application.UnifiedSWTSwingApplication.access$2(UnifiedSWTSwingApplication.java:1)
    at com.windriver.ide.application.UnifiedSWTSwingApplication.start(UnifiedSWTSwingApplication.java:70)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
    at org.eclipse.equinox.launcher.WRWBMain.main(WRWBMain.java:37)
!SESSION 2015-08-25 18:57:09.758-----------------------------------------------

I suspect this is because my Workbench is 32 bit while my host is 64 bit.

Any feedback please?


Answer:

I got the same error on Arch Linux 64 bit.

The problem lies in:

/<workbench_install_dir>/workbench-<your_version>/wrwb/wrworkbench/eclipse/plugins/com.windriver.core.runtime.jni_3.3.0.20110216-1702.jar

which needs the platform specific version (in this case linux) com.windriver.core.runtime.jni.linux_3.3.0.20110216-1702.jar (found in the same directory). Unpacking the linux specific jar will reveal the library "libstdutil.so". This library needs to be checked for missing dependencies and the missing 32bit libraries installed.

Example:

mkdir /tmp/wbtmp && cd /tmp/wbtmp
jar -xf /home/testuser/workbench/workbench-3.3/wrwb/wrworkbench/eclipse/plugins/com.windriver.core.runtime.jni.linux_3.3.0.20110216-1702.jar
cd os/linux/x86/
ldd libstdutil.so

The output of the ldd command needs to be inspected for any libraries marked as "not found" and those libraries installed. In my case I was missing libpangox-1.0.so.0.

Question:

having troubles running jTessBoxEditor 1.7.3 in Ubuntu 16.04 64Bit.

installed openjdk-9-jdk, got this message:

    $ java -jar jTessBoxEditor.jar
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f1b76d03009, pid=3964, tid=3988
#
# JRE version: OpenJDK Runtime Environment (9.0) (build 9-internal+0-2016-04-14-195246.buildd.src)
# Java VM: OpenJDK 64-Bit Server VM (9-internal+0-2016-04-14-195246.buildd.src, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# C  [libjava.so+0x1d009]  JNU_GetEnv+0x19
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %P" (or dumping to /pool0/Xtreme/home/leo128/Scrivania/jTessBoxEditor/core.3964)
#
# An error report file with more information is saved as:
# /pool0/Xtreme/home/leo128/Scrivania/jTessBoxEditor/hs_err_pid3964.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Annullato (core dump creato)

I took a minute to shorten the above mentioned log file. if you think I shortened it too much, I'll be glad to post the entire thing Here is the shortened version:

    #
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f1b76d03009, pid=3964, tid=3988
#
# JRE version: OpenJDK Runtime Environment (9.0) (build 9-internal+0-2016-04-14-195246.buildd.src)
# Java VM: OpenJDK 64-Bit Server VM (9-internal+0-2016-04-14-195246.buildd.src, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# C  [libjava.so+0x1d009]  JNU_GetEnv+0x19
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %P" (or dumping to /pool0/Xtreme/home/leo128/Scrivania/jTessBoxEditor/core.3964)
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

---------------  S U M M A R Y ------------

Command Line: jTessBoxEditor.jar

Host: Pentium(R) Dual-Core  CPU      E5700  @ 3.00GHz, 2 cores, 1G, Ubuntu 16.04.3 LTS
Time: Mon Sep 11 10:24:19 2017 CEST elapsed time: 1 seconds (0d 0h 0m 1s)

---------------  T H R E A D  ---------------

Current thread (0x00007f1b7035a800):  JavaThread "AWT-EventQueue-0" [_thread_in_native, id=3988, stack(0x00007f1b18153000,0x00007f1b18254000)]

Stack: [0x00007f1b18153000,0x00007f1b18254000],  sp=0x00007f1b1824e9d0,  free space=1006k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [libjava.so+0x1d009]  JNU_GetEnv+0x19
C  [libfontmanager.so+0x33f8e]
C  [libfreetype.so.6+0x14d2b]  FT_Stream_Seek+0x1b

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  sun.font.FreetypeFontScaler.initNativeScaler(Lsun/font/Font2D;IIZI)J+0 java.desktop@9-internal
j  sun.font.FreetypeFontScaler.<init>(Lsun/font/Font2D;IZI)V+26 java.desktop@9-internal
v  ~StubRoutines::call_stub
j  sun.reflect.NativeConstructorAccessorImpl.newInstance0(Ljava/lang/reflect/Constructor;[Ljava/lang/Object;)Ljava/lang/Object;+0 java.base@9-internal
j  sun.reflect.NativeConstructorAccessorImpl.newInstance([Ljava/lang/Object;)Ljava/lang/Object;+85 java.base@9-internal
j  sun.reflect.DelegatingConstructorAccessorImpl.newInstance([Ljava/lang/Object;)Ljava/lang/Object;+5 java.base@9-internal
j  java.lang.reflect.Constructor.newInstance([Ljava/lang/Object;)Ljava/lang/Object;+65 java.base@9-internal
j  sun.font.FontScaler.getScaler(Lsun/font/Font2D;IZI)Lsun/font/FontScaler;+39 java.desktop@9-internal
j  sun.font.TrueTypeFont.getScaler()Lsun/font/FontScaler;+21 java.desktop@9-internal
j  sun.font.FileFontStrike.<init>(Lsun/font/FileFont;Lsun/font/FontStrikeDesc;)V+204 java.desktop@9-internal
j  sun.font.FileFont.createStrike(Lsun/font/FontStrikeDesc;)Lsun/font/FontStrike;+18 java.desktop@9-internal
j  sun.font.Font2D.getStrike(Lsun/font/FontStrikeDesc;Z)Lsun/font/FontStrike;+92 java.desktop@9-internal
j  sun.font.Font2D.getStrike(Lsun/font/FontStrikeDesc;)Lsun/font/FontStrike;+3 java.desktop@9-internal
j  sun.font.CompositeStrike.getStrikeForSlot(I)Lsun/font/PhysicalStrike;+23 java.desktop@9-internal
j  sun.font.CompositeStrike.getFontMetrics()Lsun/font/StrikeMetrics;+31 java.desktop@9-internal
j  sun.font.FontDesignMetrics.initMatrixAndMetrics()V+28 java.desktop@9-internal
j  sun.font.FontDesignMetrics.<init>(Ljava/awt/Font;Ljava/awt/font/FontRenderContext;)V+62 java.desktop@9-internal
j  sun.font.FontDesignMetrics.getMetrics(Ljava/awt/Font;Ljava/awt/font/FontRenderContext;)Lsun/font/FontDesignMetrics;+128 java.desktop@9-internal
j  sun.swing.SwingUtilities2.getFontMetrics(Ljavax/swing/JComponent;Ljava/awt/Font;)Ljava/awt/FontMetrics;+15 java.desktop@9-internal
j  javax.swing.JComponent.getFontMetrics(Ljava/awt/Font;)Ljava/awt/FontMetrics;+2 java.desktop@9-internal
j  javax.swing.plaf.synth.SynthGraphicsUtils.getPreferredSize(Ljavax/swing/plaf/synth/SynthContext;Ljava/awt/Font;Ljava/lang/String;Ljavax/swing/Icon;IIIIII)Ljava/awt/Dimension;+110 java.desktop@9-internal
j  javax.swing.plaf.synth.SynthLabelUI.getPreferredSize(Ljavax/swing/JComponent;)Ljava/awt/Dimension;+82 java.desktop@9-internal
j  javax.swing.JComponent.getPreferredSize()Ljava/awt/Dimension;+26 java.desktop@9-internal
j  javax.swing.plaf.basic.BasicListUI.updateLayoutState()V+162 java.desktop@9-internal
j  javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState()V+8 java.desktop@9-internal
j  javax.swing.plaf.basic.BasicListUI$Handler.valueChanged(Ljavax/swing/event/ListSelectionEvent;)V+4 java.desktop@9-internal
j  javax.swing.DefaultListSelectionModel.fireValueChanged(IIZ)V+64 java.desktop@9-internal
j  javax.swing.DefaultListSelectionModel.fireValueChanged(II)V+7 java.desktop@9-internal
j  javax.swing.DefaultListSelectionModel.fireValueChanged()V+70 java.desktop@9-internal
j  javax.swing.DefaultListSelectionModel.changeSelection(IIIIZ)V+92 java.desktop@9-internal
j  javax.swing.DefaultListSelectionModel.changeSelection(IIII)V+7 java.desktop@9-internal
j  javax.swing.DefaultListSelectionModel.setSelectionInterval(II)V+59 java.desktop@9-internal
j  javax.swing.JList.setSelectedIndex(I)V+20 java.desktop@9-internal
j  javax.swing.plaf.basic.BasicComboPopup.setListSelection(I)V+20 java.desktop@9-internal
j  javax.swing.plaf.basic.BasicComboPopup.access$300(Ljavax/swing/plaf/basic/BasicComboPopup;I)V+2 java.desktop@9-internal
j  javax.swing.plaf.basic.BasicComboPopup$Handler.itemStateChanged(Ljava/awt/event/ItemEvent;)V+24 java.desktop@9-internal
j  javax.swing.JComboBox.fireItemStateChanged(Ljava/awt/event/ItemEvent;)V+34 java.desktop@9-internal
j  javax.swing.JComboBox.selectedItemChanged()V+64 java.desktop@9-internal
j  javax.swing.JComboBox.contentsChanged(Ljavax/swing/event/ListDataEvent;)V+28 java.desktop@9-internal
j  javax.swing.AbstractListModel.fireContentsChanged(Ljava/lang/Object;II)V+64 java.desktop@9-internal
j  com.sun.java.swing.plaf.gtk.GTKFileChooserUI$FilterComboBoxModel.propertyChange(Ljava/beans/PropertyChangeEvent;)V+42 java.desktop@9-internal
J 826 C1  java.desktop@9-internal9-internal (39 bytes) @ 0x00007f1b5a348aec [0x00007f1b5a3489a0+0x000000000000014c]
J 841 C1  java.desktop@9-internal9-internal (81 bytes) @ 0x00007f1b5a3568bc [0x00007f1b5a355c60+0x0000000000000c5c]
J 788 C1  java.desktop@9-internal9-internal (59 bytes) @ 0x00007f1b5a3397b4 [0x00007f1b5a338f20+0x0000000000000894]
j  javax.swing.JFileChooser.setFileFilter(Ljavax/swing/filechooser/FileFilter;)V+171 java.desktop@9-internal
j  javax.swing.JFileChooser.addChoosableFileFilter(Ljavax/swing/filechooser/FileFilter;)V+59 java.desktop@9-internal
j  javax.swing.JFileChooser.updateUI()V+55 java.desktop@9-internal
j  javax.swing.JFileChooser.setup(Ljavax/swing/filechooser/FileSystemView;)V+22 java.desktop@9-internal
j  javax.swing.JFileChooser.<init>(Ljava/io/File;Ljavax/swing/filechooser/FileSystemView;)V+123 java.desktop@9-internal
j  javax.swing.JFileChooser.<init>()V+9 java.desktop@9-internal
j  net.sourceforge.tessboxeditor.Gui.initComponents()V+5
j  net.sourceforge.tessboxeditor.Gui.<init>()V+102
j  net.sourceforge.tessboxeditor.GuiWithMRU.<init>()V+1
j  net.sourceforge.tessboxeditor.GuiWithEdit.<init>()V+1
j  net.sourceforge.tessboxeditor.GuiWithSpinner.<init>()V+1
j  net.sourceforge.tessboxeditor.GuiWithFont.<init>()V+1
j  net.sourceforge.tessboxeditor.GuiWithLaF.<init>()V+1
j  net.sourceforge.tessboxeditor.GuiWithTools.<init>()V+1
j  net.sourceforge.tessboxeditor.GuiWithGenerator.<init>()V+1
j  net.sourceforge.tessboxeditor.GuiWithTrainer.<init>()V+1
j  net.sourceforge.tessboxeditor.GuiWithValidator.<init>()V+1
j  net.sourceforge.tessboxeditor.GuiWithValidator$1.run()V+4
j  java.awt.event.InvocationEvent.dispatch()V+47 java.desktop@9-internal
j  java.awt.EventQueue.dispatchEventImpl(Ljava/awt/AWTEvent;Ljava/lang/Object;)V+21 java.desktop@9-internal
j  java.awt.EventQueue.access$500(Ljava/awt/EventQueue;Ljava/awt/AWTEvent;Ljava/lang/Object;)V+3 java.desktop@9-internal
j  java.awt.EventQueue$3.run()Ljava/lang/Void;+32 java.desktop@9-internal
j  java.awt.EventQueue$3.run()Ljava/lang/Object;+1 java.desktop@9-internal
v  ~StubRoutines::call_stub
j  java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;+0 java.base@9-internal
j  java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;Ljava/security/AccessControlContext;)Ljava/lang/Object;+18 java.base@9-internal
j  java.awt.EventQueue.dispatchEvent(Ljava/awt/AWTEvent;)V+46 java.desktop@9-internal
j  java.awt.EventDispatchThread.pumpOneEventForFilters(I)V+183 java.desktop@9-internal
j  java.awt.EventDispatchThread.pumpEventsForFilter(ILjava/awt/Conditional;Ljava/awt/EventFilter;)V+35 java.desktop@9-internal
j  java.awt.EventDispatchThread.pumpEventsForHierarchy(ILjava/awt/Conditional;Ljava/awt/Component;)V+11 java.desktop@9-internal
j  java.awt.EventDispatchThread.pumpEvents(ILjava/awt/Conditional;)V+4 java.desktop@9-internal
j  java.awt.EventDispatchThread.pumpEvents(Ljava/awt/Conditional;)V+3 java.desktop@9-internal
j  java.awt.EventDispatchThread.run()V+9 java.desktop@9-internal
v  ~StubRoutines::call_stub

siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x0000000000000000

Register to memory mapping:

RAX=0x0000000000000000 is an unknown value
RBX=0x0000000000000000 is an unknown value
RCX=0x0000000000000000 is an unknown value
RDX=0x0000000000010002 is an unknown value
RSP=0x00007f1b1824e9d0 is pointing into the stack for thread: 0x00007f1b7035a800
RBP=0x00007f1b1824e9e0 is pointing into the stack for thread: 0x00007f1b7035a800
RSI=0x0000000000010002 is an unknown value
RDI=0x0000000000000000 is an unknown value
R8 =0x0000000000000000 is an unknown value
R9 =0x0000000000000004 is an unknown value
R10=0x00000000000001db is an unknown value
R11=0x00007f1b76d02ff0: JNU_GetEnv+0x0000000000000000 in /usr/lib/jvm/java-9-openjdk-amd64/lib/amd64/libjava.so at 0x00007f1b76ce6000
R12=0x00007f1b3c27c490 is an unknown value
R13=0x0000000000000000 is an unknown value
R14=0x0000000000000000 is an unknown value
R15=0x00007f1b3c27c4f0 is an unknown value

...............................
...............................
...............................


Classes redefined (0 events):
No events

Internal exceptions (10 events):
Event: 0,482 Thread 0x00007f1b70011000 Exception <a 'java/lang/ClassNotFoundException': sun/awt/resources/awtProvider> (0x00000000e332c350) thrown at [/build/openjdk-9-argm_o/openjdk-9-9~b114/src/hotspot/src/share/vm/classfile/systemDictionary.cpp, line 224]
Event: 0,504 Thread 0x00007f1b70011000 Exception <a 'java/io/FileNotFoundException'> (0x00000000e334da08) thrown at [/build/openjdk-9-argm_o/openjdk-9-9~b114/src/hotspot/src/share/vm/prims/jni.cpp, line 605]
Event: 0,505 Thread 0x00007f1b70011000 Exception <a 'java/io/FileNotFoundException'> (0x00000000e3356040) thrown at [/build/openjdk-9-argm_o/openjdk-9-9~b114/src/hotspot/src/share/vm/prims/jni.cpp, line 605]
Event: 0,740 Thread 0x00007f1b7035a800 Exception <a 'java/lang/ClassNotFoundException': com/sun/swing/internal/plaf/metal/resources/metalProvider> (0x00000000e31fc238) thrown at [/build/openjdk-9-argm_o/openjdk-9-9~b114/src/hotspot/src/share/vm/classfile/systemDictionary.cpp, line 224]
Event: 0,742 Thread 0x00007f1b7035a800 Exception <a 'java/lang/ClassNotFoundException': com/sun/swing/internal/plaf/basic/resources/basicProvider> (0x00000000e2f007a8) thrown at [/build/openjdk-9-argm_o/openjdk-9-9~b114/src/hotspot/src/share/vm/classfile/systemDictionary.cpp, line 224]
Event: 0,759 Thread 0x00007f1b7035a800 Implicit null exception at 0x00007f1b61722838 to 0x00007f1b617228c6
Event: 0,818 Thread 0x00007f1b7035a800 Implicit null exception at 0x00007f1b6172250f to 0x00007f1b61722579
Event: 1,146 Thread 0x00007f1b7035a800 Exception <a 'java/lang/ClassNotFoundException': com/sun/java/swing/plaf/gtk/resources/gtkProvider> (0x00000000e2c8a9a0) thrown at [/build/openjdk-9-argm_o/openjdk-9-9~b114/src/hotspot/src/share/vm/classfile/systemDictionary.cpp, line 224]
Event: 1,148 Thread 0x00007f1b7035a800 Exception <a 'java/lang/ClassNotFoundException': com/sun/swing/internal/plaf/synth/resources/synthProvider> (0x00000000e2c8ff70) thrown at [/build/openjdk-9-argm_o/openjdk-9-9~b114/src/hotspot/src/share/vm/classfile/systemDictionary.cpp, line 224]
Event: 1,149 Thread 0x00007f1b7035a800 Exception <a 'java/lang/ClassNotFoundException': com/sun/swing/internal/plaf/basic/resources/basicProvider> (0x00000000e2c93258) thrown at [/build/openjdk-9-argm_o/openjdk-9-9~b114/src/hotspot/src/share/vm/classfile/systemDictionary.cpp, line 224]

Events (10 events):
Event: 1,375 loading class sun/font/StrikeCache$SoftDisposerRef
Event: 1,375 loading class sun/font/StrikeCache$DisposableStrike
Event: 1,375 loading class sun/font/StrikeCache$DisposableStrike done
Event: 1,375 loading class sun/font/StrikeCache$SoftDisposerRef done
Event: 1,375 loading class sun/font/FileFontStrike
Event: 1,376 loading class sun/font/FileFontStrike done
Event: 1,376 loading class sun/font/FontScaler
Event: 1,376 loading class sun/font/FontScaler done
Event: 1,376 loading class sun/font/FreetypeFontScaler
Event: 1,377 loading class sun/font/FreetypeFontScaler done


Dynamic libraries:
00400000-00401000 r-xp 00000000 08:01 264899                             /usr/lib/jvm/java-9-openjdk-amd64/bin/java
00600000-00601000 r--p 00000000 08:01 264899                             /usr/lib/jvm/java-9-openjdk-amd64/bin/java
00601000-00602000 rw-p 00001000 08:01 264899                             /usr/lib/jvm/java-9-openjdk-amd64/bin/java
0123d000-0125e000 rw-p 00000000 00:00 0                                  [heap]
e1400000-e3400000 rw-p 00000000 00:00 0 
e3400000-100000000 ---p 00000000 00:00 0 
100000000-100220000 rw-p 00000000 00:00 0 
100220000-140000000 ---p 00000000 00:00 0 
7f1b0e428000-7f1b0e4e8000 rw-p 00000000 00:00 0 
7f1b0e4e8000-7f1b0e628000 ---p 00000000 00:00 0 
7f1b0e628000-7f1b0e62c000 ---p 00000000 00:00 0 
7f1b0e62c000-7f1b0e729000 rw-p 00000000 00:00 0 
7f1b0e729000-7f1b0e72a000 ---p 00000000 00:00 0 
7f1b0e72a000-7f1b0ef2a000 rw-p 00000000 00:00 0 
7f1b0ef2a000-7f1b0ef2b000 ---p 00000000 00:00 0 
7f1b0ef2b000-7f1b0f72b000 rw-p 00000000 00:00 0 
7f1b0f72b000-7f1b0f791000 r-xp 00000000 08:01 273141                     /usr/lib/x86_64-linux-gnu/libibus-1.0.so.5.0.511
7f1b0f791000-7f1b0f990000 ---p 00066000 08:01 273141                     /usr/lib/x86_64-linux-gnu/libibus-1.0.so.5.0.511
7f1b0f990000-7f1b0f992000 r--p 00065000 08:01 273141                     /usr/lib/x86_64-linux-gnu/libibus-1.0.so.5.0.511
7f1b0f992000-7f1b0f993000 rw-p 00067000 08:01 273141                     /usr/lib/x86_64-linux-gnu/libibus-1.0.so.5.0.511
7f1b0f993000-7f1b0f994000 rw-p 00000000 00:00 0 
7f1b0f9af000-7f1b0f9b5000 r-xp 00000000 08:01 524569                     /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so
7f1b0f9b5000-7f1b0fbb5000 ---p 00006000 08:01 524569                     /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so
7f1b0fbb5000-7f1b0fbb6000 r--p 00006000 08:01 524569                     /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so
7f1b0fbb6000-7f1b0fbb7000 rw-p 00007000 08:01 524569                     /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so
7f1b0fbb7000-7f1b0fc0b000 r--p 00000000 08:01 918616                     /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf
7f1b0fc0b000-7f1b0fc62000 r--p 00000000 08:01 918748                     /usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-R.ttf
7f1b0fc62000-7f1b0fc7a000 r--s 00000000 08:01 918786                     /usr/share/fonts/type1/gsfonts/c059033l.pfb
7f1b0fc7a000-7f1b0fc94000 r--s 00000000 08:01 918780                     /usr/share/fonts/type1/gsfonts/c059013l.pfb
.......................................
.......................................
.......................................
.......................................

7f1b79b8d000-7f1b79b8e000 rw-p 00000000 00:00 0 
7ffde0a59000-7ffde0a7a000 rw-p 00000000 00:00 0                          [stack]
7ffde0b39000-7ffde0b3b000 r--p 00000000 00:00 0                          [vvar]
7ffde0b3b000-7ffde0b3d000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]

VM Arguments:
java_command: jTessBoxEditor.jar
java_class_path (initial): jTessBoxEditor.jar
Launcher Type: SUN_STANDARD

Environment Variables:
PATH=/home/leo128/bin:/home/leo128/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
SHELL=/bin/bash
DISPLAY=:0

Signal Handlers:
SIGSEGV: [libjvm.so+0xc12c20], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
SIGBUS: [libjvm.so+0xc12c20], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
SIGFPE: [libjvm.so+0xc12c20], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
SIGPIPE: SIG_IGN, sa_mask[0]=00000000000010000000000000000000, sa_flags=SA_RESTART
SIGXFSZ: [libjvm.so+0xa3b600], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
SIGILL: [libjvm.so+0xc12c20], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
SIGUSR2: [libjvm.so+0xa3b4a0], sa_mask[0]=00000000000000000000000000000000, sa_flags=SA_RESTART|SA_SIGINFO
SIGHUP: [libjvm.so+0xa3b870], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
SIGINT: [libjvm.so+0xa3b870], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
SIGTERM: [libjvm.so+0xa3b870], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
SIGQUIT: [libjvm.so+0xa3b870], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO


---------------  S Y S T E M  ---------------

OS:DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.3 LTS"
uname:Linux 4.10.0-33-generic #37~16.04.1-Ubuntu SMP Fri Aug 11 14:07:24 UTC 2017 x86_64
libc:glibc 2.23 NPTL 2.23 
rlimit: STACK 8192k, CORE 0k, NPROC 7681, NOFILE 1048576, AS infinity
load average:0,77 1,08 0,56

.......................................
.......................................


CPU:total 2 (2 cores per cpu, 1 threads per core) family 6 model 23 stepping 10, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, tsc

CPU Model and flags from /proc/cpuinfo:
model name  : Pentium(R) Dual-Core  CPU      E5700  @ 3.00GHz
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm xsave lahf_lm tpr_shadow vnmi flexpriority dtherm

Memory: 4k page, physical 2010896k(74736k free), swap 1952764k(1948008k free)

vm_info: OpenJDK 64-Bit Server VM (9-internal+0-2016-04-14-195246.buildd.src) for linux-amd64 JRE (9-internal+0-2016-04-14-195246.buildd.src), built on Apr 14 2016 20:05:37 by "buildd" with gcc 5.3.1 20160413

END.

I hope it will be of any use.

Even if nobody knows how to solve this, I would appreciate a pointer to a fallback-solution, maybe in a comment as an indication, pointing me to another tesseract 3.04 compatible box-file editor that runs well in Ubuntu 16.04, possibly without lots and lots of headaches building it. Training Tesseract seems to be a real PITA, you know... I tried QT-Box-Editor but I had problems there too, will give it another chance if somebody had got it working on 16.04.

Thank you in advance


Answer:

Try launching it with Oracle JDK/JRE 8.

Question:

I am using Ubuntu LTS 14.04 with open-jdk 8u111-b14-3~14.04.1 from openjdk-r PPA.

The version was changed to 8u141-b15-3~14.04 and after installation on new machine I have problem with missing cacert file.

Related bug https://bugs.launchpad.net/ubuntu/+source/ca-certificates-java/+bug/1706442 was marker as Invalid. Is there any chance that it will be fixed? Or is there any option to return previous version.


Answer:

I think the simplest solution is to bite the bullet and upgrade to a version of Ubuntu (or some other distrbiution) that supports OpenJDK 8 as a first class package.

The bug you linked to will most likely not be fixed. That bug says "it's a bug in ca-certificate-java". It isn't. It is a bug in the openjdk package since the OpenJDK 8 package claims that it will break ca-certificate-java.

Can you contact the maintainers of that PPA and ask them to fix their builds for 14.04 instead? As I understand it, they have a number of options to fix things. A fix with a small amount of effort to support 14.04 would be to not depend on ca-certificates-java. OpenJDK builds can bundle certificates; bad as it is, it might be the only way to support something as old as 14.04. It is probably less bad than providing broken packages for 14.04.