Menu

#22 libjoxy.so is not working...

0.3.0
pending
None
major
native-text
2015-02-19
2014-03-21
No

I already copied the text-rendering library "libjoxy.so" in /usr/lib/jni and in /usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64

I found that the file is executable... but it does not work, every time I execute one java app, it stills render the java text, not my fonts and the program shows this message:

[W] joxy.utils.JoxyGraphics.<clinit>(): Native text rendering requested  (joxy.utils.JoxyGraphics.NATIVE_TEXT_RENDERING == true), but could not initialize the native library code. Joxy will fallback on Java text rendering.

For me, your library is broken I have it already in the places you recommend, and it does not work.

I tried to remove the executable bit on your file, with no change still not working.

ls -la /usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64
total 4212
drwxr-xr-x 9 root root   4096 mar 21 13:19 .
drwxr-xr-x 8 root root   4096 jul 25  2013 ..
drwxr-xr-x 2 root root   4096 jul 25  2013 cacao
drwxr-xr-x 2 root root   4096 jul 25  2013 headless
-rw-r--r-- 1 root root 187784 oct  2 10:20 IcedTeaPlugin.so
drwxr-xr-x 2 root root   4096 jul 25  2013 jamvm
drwxr-xr-x 2 root root   4096 jul 25  2013 jli
lrwxrwxrwx 1 root root     33 jul 12  2013 jvm.cfg -> /etc/java-6-openjdk/jvm-amd64.cfg
-rw-r--r-- 1 root root    278 jul 12  2013 jvm.cfg-default
-rw-r--r-- 1 root root  11752 jul 12  2013 libattach.so
-rw-r--r-- 1 root root 764744 jul 12  2013 libawt.so
-rw-r--r-- 1 root root  16592 jul 12  2013 libdt_socket.so
-rw-r--r-- 1 root root 306200 jul 12  2013 libfontmanager.so
-rw-r--r-- 1 root root 180280 jul 12  2013 libhprof.so
-rw-r--r-- 1 root root  39888 jul 12  2013 libinstrument.so
-rw-r--r-- 1 root root  35904 jul 12  2013 libj2gss.so
-rw-r--r-- 1 root root  11112 jul 12  2013 libj2pcsc.so
-rw-r--r-- 1 root root  68528 jul 12  2013 libj2pkcs11.so
-rw-r--r-- 1 root root   5904 jul 12  2013 libjaas_unix.so
-rw-r--r-- 1 root root  21584 jul 12  2013 libjava_crw_demo.so
-rw-r--r-- 1 root root 201280 jul 12  2013 libjava.so
-rw-r--r-- 1 root root   5080 jul 12  2013 libjawt.so
-rw-r--r-- 1 root root 238488 jul 12  2013 libjdwp.so
-rw-r--r-- 1 root root 414441 mar 21 13:19 libjoxy.so
-rw-r--r-- 1 root root  40960 jul 12  2013 libjpeg.so
-rw-r--r-- 1 root root   7864 jul 12  2013 libjsig.so
-rw-r--r-- 1 root root  62592 jul 12  2013 libjsoundalsa.so
-rw-r--r-- 1 root root   5264 jul 12  2013 libjsound.so
-rw-r--r-- 1 root root 206440 jul 12  2013 liblcms.so
-rw-r--r-- 1 root root  27632 jul 12  2013 libmanagement.so
-rw-r--r-- 1 root root 877208 jul 12  2013 libmlib_image.so
-rw-r--r-- 1 root root  86688 jul 12  2013 libnet.so
-rw-r--r-- 1 root root  34368 jul 12  2013 libnio.so
-rw-r--r-- 1 root root  12752 jul 12  2013 libnpt.so
-rw-r--r-- 1 root root  53744 jul 12  2013 libpulse-java.so
-rw-r--r-- 1 root root   4640 jul 12  2013 librmi.so
-rw-r--r-- 1 root root  41968 jul 12  2013 libsaproc.so
-rw-r--r-- 1 root root  41496 jul 12  2013 libsplashscreen.so
-rw-r--r-- 1 root root  82160 jul 12  2013 libunpack.so
-rw-r--r-- 1 root root  66848 jul 12  2013 libverify.so
-rw-r--r-- 1 root root  30216 jul 12  2013 libzip.so
drwxr-xr-x 2 root root   4096 jul 25  2013 native_threads
drwxr-xr-x 2 root root   4096 jul 25  2013 server
drwxr-xr-x 2 root root   4096 jul 25  2013 xawt

ls -la /usr/lib/jni
total 1756
drwxr-xr-x   2 root root   4096 mar 20 22:18 .
drwxr-xr-x 171 root root  65536 mar 20 21:41 ..    
-rwxr-xr-x   1 root root 414441 mar 20 22:18 libjoxy.so
-rw-r--r--   1 root root  51664 jun 29  2012 libswt-atk-gtk-3833.so
-rw-r--r--   1 root root   5944 jun 29  2012 libswt-awt-gtk-3833.so
-rw-r--r--   1 root root  60448 jun 29  2012 libswt-cairo-gtk-3833.so
-rw-r--r--   1 root root 573376 jun 29  2012 libswt-gtk-3833.so
-rw-r--r--   1 root root 530272 jun 29  2012 libswt-pi-gtk-3833.so
-rw-r--r--   1 root root  51096 jun 29  2012 libswt-webkit-gtk-3833.so
-rw-r--r--   1 root root  11528 ene 26 16:31 libtuxguitar-alsa-jni.so
-rw-r--r--   1 root root   8592 ene 26 16:31 libtuxguitar-oss-jni.so

If I did something wrong, I suggest you to change your documentation, because I just what you speceify on it.

My machine is Debian 7.4 64 bit.

Discussion

  • Thom Castermans

    Thom Castermans - 2014-03-22

    Hi Jose,

    First of all, I'm very sorry to hear that native text rendering does not work for you. If something is wrong or missing in the documentation, I will of course fix that immediately.

    I am running Debian myself, 64 bit as well, but version Jessie/Sid. Anyway, I should be able to reproduce your problem and help you very well :-)

    It should not be necessary to put the libjoxy.so file in two places, I would advise to stick to only having it in /usr/lib/jni. Still, it should not be a problem to have it in two places anyway. Can I ask you: did you compile the library yourself (see here), or did you use a downloaded version? If so, what is the output of the compile.sh script?

    Thanks in advance,
    Thom

     
  • Thom Castermans

    Thom Castermans - 2014-03-22
    • status: open --> pending
    • assigned_to: Thom Castermans
    • Milestone: future --> 0.3.0
    • Priority: ? --> major
    • Component: laf --> native-text
     
  • Jose Luis Triana

    No compilation I downloaded the zip file "joxy-latest", and well, it seems that everything is broken because the file in /etc/java-6-openjdk/swing.properties has no effect in any java applications, I have to run them wit the -Dswing parameter and the font rendering library is just in my harddrive for nothing...

    but no every app works with your laf... I use openproj, no matter what I put in commandline it still shows its terrible appereance... son do I need java 7?

     
  • Thom Castermans

    Thom Castermans - 2014-03-28

    Hi Jose,

    Thanks for your answer. Could you please save the following script in a directory where you can create files and run it (either making it executable or by executing

    bash howYouCalledTheScript.sh
    

    )?

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    #!/bin/bash
    
    NAME=`basename "$0"`
    DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
    cd "$DIR"
    
    cat <<EOF > "ListPlafs.java"
    import javax.swing.UIManager;
    
    public class ListPlafs {
      public static void main(String args[]) {
        System.out.println("-- INSTALLED LOOK & FEELS --");
        UIManager.LookAndFeelInfo plaf[] = UIManager.getInstalledLookAndFeels();
        for (int i = 0, n = plaf.length; i < n; i++) {
          System.out.println("Name: " + plaf[i].getName());
          System.out.println("  Class name: " + plaf[i].getClassName());
        }
    
        System.out.println();
        System.out.println("-- JOXY LOOK & FEEL --");
        try {
          Class.forName("joxy.JoxyLookAndFeel");
          System.out.println("Joxy can be found on the classpath.");
        } catch(ClassNotFoundException e) {
          System.out.println("Could NOT find Joxy!");
        }
    
        System.exit(0);
      }
    }
    EOF
    
    echo "$NAME: Comiling Java source..."
    javac "ListPlafs.java"
    java "ListPlafs"
    echo "$NAME: Cleaning up..."
    rm "ListPlafs.java" "ListPlafs.class"
    

    On my system, where Joxy is installed and actually works, I get the following output (note that Joxy is not listed in the installed look & feels).

    listJavaLAFs.sh: Comiling Java source...
    -- INSTALLED LOOK & FEELS --
    Name: Metal
      Class name: javax.swing.plaf.metal.MetalLookAndFeel
    Name: Nimbus
      Class name: javax.swing.plaf.nimbus.NimbusLookAndFeel
    Name: CDE/Motif
      Class name: com.sun.java.swing.plaf.motif.MotifLookAndFeel
    Name: GTK+
      Class name: com.sun.java.swing.plaf.gtk.GTKLookAndFeel
    
    -- JOXY LOOK & FEEL --
    Joxy can be found on the classpath.
    listJavaLAFs.sh: Cleaning up...
    

    You do not need Java 7 to run Joxy, it should work perfectly fine with Java 6. However, I tried to test Joxy on openproj and it gave me an error message saying that it does not work with the OpenJDK, only with the Sun Java implementation. Could you please post back the output of running

    dpkg -l | grep jdk
    

    ? Have you installed Java in some non-standard way? Neither me nor Willem, the co-author of Joxy, have the Sun Java implementation installed, so we did never test if Joxy works. It should work the same there though.

     

    Last edit: Thom Castermans 2014-03-29
  • Jose Luis Triana

    Hello!

    here's the output:

    /script.sh
    script.sh: Comiling Java source...
    -- INSTALLED LOOK & FEELS --
    Name: Joxy
      Class name: joxy.JoxyLookAndFeel
    
    -- JOXY LOOK & FEEL --
    Joxy can be found on the classpath.
    script.sh: Cleaning up...
    

    I installed openjdk-6 from official Debian wheezy packages:

    dpkg -l | grep jdk
    ii  openjdk-6-jdk:amd64 6b27-1.12.6-1~deb7u1 amd64 OpenJDK Development Kit (JDK)
    ii  openjdk-6-jre:amd64 6b27-1.12.6-1~deb7u1 amd64 OpenJDK Java runtime, using Hotspot JIT
    ii  openjdk-6-jre-headless:amd64 6b27-1.12.6-1~deb7u1 amd64 OpenJDK Java runtime, using Hotspot JIT (headless)
    ii  openjdk-6-jre-lib 6b27-1.12.6-1~deb7u1 all OpenJDK Java runtime (architecture independent libraries)
    

    Thank you for your help!

     

    Last edit: Jose Luis Triana 2014-03-31
  • Thom Castermans

    Thom Castermans - 2014-03-31

    Hi Jose,

    Thanks for cooperating so much, it really helps (also for other users of course) ;-)

    I'm a bit confused by the fact that Joxy seems to be the only LAF that is installed according to Java... The Metal LAF is built-in and should hence always be installed. This can however be 'overridden' in the swing.properties file. Could you please post the contents of that file on your system here? On my system, it can be found in /usr/lib/jvm/java-6-openjdk-amd64/jre/lib (and in the according Java 7 directory, but you have Java 6 on your machine :-)).

    My swing.properties file looks like this:

    swing.defaultlaf=joxy.JoxyLookAndFeel
    swing.systemlaf=joxy.JoxyLookAndFeel
    swing.installedlafs=metal,nimbus,motif,gtk,joxy
    swing.installedlaf.metal.name=Metal
    swing.installedlaf.metal.class=javax.swing.plaf.metal.MetalLookAndFeel
    swing.installedlaf.nimbus.name=Nimbus
    swing.installedlaf.nimbus.class=com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel
    swing.installedlaf.motif.name=CDE/Motif
    swing.installedlaf.motif.class=com.sun.java.swing.plaf.motif.MotifLookAndFeel
    swing.installedlaf.gtk.name=GTK+
    swing.installedlaf.gtk.class=com.sun.java.swing.plaf.gtk.GTKLookAndFeel
    swing.installedlaf.joxy.name=Joxy
    swing.installedlaf.joxy.class=joxy.JoxyLookAndFeel
    

    Also: if you have the OpenJDK installed, how come that you are able to run openproj? Did you do something special for that? I would really like to test Joxy on openproj myself, but as I wrote before, it complains about not having the correct Java implementation for some (stupid, IMHO) reason.

    Cheers,
    Thom

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.