Problem with java app Subclient

Background problem:
There is this music service called Subsonic and it has a desktop java app that is in beta for linux called Subclient.
The java app comes with a bash launcher which is broken (endline encoding) but you can launch Subclient.jar and the program starts fine.
The app finds my local subsonic server without problems and displays the songs etc…
I then select a song to play and get nothing, the album cover comes up and it acts like it should be playing but …No Sound or progress of the play bar.

Background Error: — You should see the error about 20 lines down. " java.lang.UnsatisfiedLinkError: libjawt.so: cannot open shared object file: No such file or directory " I think this is what is stopping the app from actually playing music.

You are just gonna have to deal with the wrap lines :slight_smile: I just copy/paste in code tags and get wrap lines these days. I think klipper is doing something weird.

lee@linux-aa3c:~/bin/subclient-0.10.3> ./Subclient.shFontconfig warning: "/etc/fonts/conf.d/56-user.conf", line 9: reading configurations from ~/.fonts.conf is deprecated.
       _       _
__   _| | ___ (_)
\ \ / / |/ __|| |
 \ V /| | (__ | |
  \_/ |_|\___|/ | 2.1.0
            |__/  www.capricasoftware.co.uk


VLCJ is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.


VLCJ is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.


You should have received a copy of the GNU General Public License
along with VLCJ.  If not, see <http://www.gnu.org/licenses/>.


Copyright 2009, 2010, 2011, 2012 Caprica Software Limited.


java.lang.UnsatisfiedLinkError: libjawt.so: cannot open shared object file: No such file or directory
        at com.sun.jna.Native.getWindowHandle0(Native Method)
        at com.sun.jna.Native$AWT.getComponentID(Native.java:1766)
        at com.sun.jna.Native.getComponentID(Native.java:252)
        at uk.co.caprica.vlcj.player.embedded.videosurface.CanvasVideoSurface.attach(CanvasVideoSurface.java:69)
        at uk.co.caprica.vlcj.player.embedded.DefaultEmbeddedMediaPlayer.attachVideoSurface(DefaultEmbeddedMediaPlayer.java:156)
        at uk.co.caprica.vlcj.player.embedded.DefaultEmbeddedMediaPlayer.onBeforePlay(DefaultEmbeddedMediaPlayer.java:315)                                       
        at uk.co.caprica.vlcj.player.DefaultMediaPlayer.play(DefaultMediaPlayer.java:665)                                                                        
        at uk.co.caprica.vlcj.player.DefaultMediaPlayer.playMedia(DefaultMediaPlayer.java:203)                                                                   
        at net.subclient.player.PlayerHandler.playAudio(Unknown Source)                                                                                          
        at net.subclient.gui.MainFrame.play(Unknown Source)                                                                                                      
        at net.subclient.gui.MainFrame.btnPlay_actionPerformed(Unknown Source)                                                                                   
        at net.subclient.gui.MainFrame.access$2100(Unknown Source)                                                                                               
        at net.subclient.gui.MainFrame$22.actionPerformed(Unknown Source)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
        at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
        at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
        at java.awt.Component.processMouseEvent(Component.java:6505)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3312)
        at java.awt.Component.processEvent(Component.java:6270)
        at java.awt.Container.processEvent(Container.java:2229)
        at java.awt.Component.dispatchEventImpl(Component.java:4861)
        at java.awt.Container.dispatchEventImpl(Container.java:2287)
        at java.awt.Component.dispatchEvent(Component.java:4687)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
        at java.awt.Container.dispatchEventImpl(Container.java:2273)
        at java.awt.Window.dispatchEventImpl(Window.java:2719)
        at java.awt.Component.dispatchEvent(Component.java:4687)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:729)
        at java.awt.EventQueue.access$200(EventQueue.java:103)
        at java.awt.EventQueue$3.run(EventQueue.java:688)
        at java.awt.EventQueue$3.run(EventQueue.java:686)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
        at java.awt.EventQueue$4.run(EventQueue.java:702)
        at java.awt.EventQueue$4.run(EventQueue.java:700)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:699)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
java.lang.UnsatisfiedLinkError: libjawt.so: cannot open shared object file: No such file or directory
        at com.sun.jna.Native.getWindowHandle0(Native Method)
        at com.sun.jna.Native$AWT.getComponentID(Native.java:1766)
        at com.sun.jna.Native.getComponentID(Native.java:252)
        at uk.co.caprica.vlcj.player.embedded.videosurface.CanvasVideoSurface.attach(CanvasVideoSurface.java:69)
        at uk.co.caprica.vlcj.player.embedded.DefaultEmbeddedMediaPlayer.attachVideoSurface(DefaultEmbeddedMediaPlayer.java:156)
        at uk.co.caprica.vlcj.player.embedded.DefaultEmbeddedMediaPlayer.onBeforePlay(DefaultEmbeddedMediaPlayer.java:315)
        at uk.co.caprica.vlcj.player.DefaultMediaPlayer.play(DefaultMediaPlayer.java:665)
        at uk.co.caprica.vlcj.player.DefaultMediaPlayer.playMedia(DefaultMediaPlayer.java:203)
        at net.subclient.player.PlayerHandler.playAudio(Unknown Source)
        at net.subclient.gui.MainFrame.play(Unknown Source)
        at net.subclient.gui.MainFrame.fillCurrentPlaylist(Unknown Source)
        at net.subclient.gui.PanelSongs.addSelectedSongs(Unknown Source)
        at net.subclient.gui.PanelSongs.btnPlaySelected_actionPerformed(Unknown Source)
        at net.subclient.gui.PanelSongs.tableMusicSongs_mouseClicked(Unknown Source)
        at net.subclient.gui.PanelSongs$5.mouseClicked(Unknown Source)
        at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:270)
        at java.awt.Component.processMouseEvent(Component.java:6508)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3312)
        at java.awt.Component.processEvent(Component.java:6270)
        at java.awt.Container.processEvent(Container.java:2229)
        at java.awt.Component.dispatchEventImpl(Component.java:4861)
        at java.awt.Container.dispatchEventImpl(Container.java:2287)
        at java.awt.Component.dispatchEvent(Component.java:4687)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4501)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
        at java.awt.Container.dispatchEventImpl(Container.java:2273)
        at java.awt.Window.dispatchEventImpl(Window.java:2719)
        at java.awt.Component.dispatchEvent(Component.java:4687)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:729)
        at java.awt.EventQueue.access$200(EventQueue.java:103)
        at java.awt.EventQueue$3.run(EventQueue.java:688)
        at java.awt.EventQueue$3.run(EventQueue.java:686)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
        at java.awt.EventQueue$4.run(EventQueue.java:702)
        at java.awt.EventQueue$4.run(EventQueue.java:700)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:699)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
java.lang.UnsatisfiedLinkError: libjawt.so: cannot open shared object file: No such file or directory
        at com.sun.jna.Native.getWindowHandle0(Native Method)
        at com.sun.jna.Native$AWT.getComponentID(Native.java:1766)
        at com.sun.jna.Native.getComponentID(Native.java:252)
        at uk.co.caprica.vlcj.player.embedded.videosurface.CanvasVideoSurface.attach(CanvasVideoSurface.java:69)
        at uk.co.caprica.vlcj.player.embedded.DefaultEmbeddedMediaPlayer.attachVideoSurface(DefaultEmbeddedMediaPlayer.java:156)
        at uk.co.caprica.vlcj.player.embedded.DefaultEmbeddedMediaPlayer.onBeforePlay(DefaultEmbeddedMediaPlayer.java:315)
        at uk.co.caprica.vlcj.player.DefaultMediaPlayer.play(DefaultMediaPlayer.java:665)
        at uk.co.caprica.vlcj.player.DefaultMediaPlayer.playMedia(DefaultMediaPlayer.java:203)
        at net.subclient.player.PlayerHandler.playAudio(Unknown Source)
        at net.subclient.gui.MainFrame.play(Unknown Source)
        at net.subclient.gui.MainFrame.btnPlay_actionPerformed(Unknown Source)
        at net.subclient.gui.MainFrame.access$2100(Unknown Source)
        at net.subclient.gui.MainFrame$22.actionPerformed(Unknown Source)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
        at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
        at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
        at java.awt.Component.processMouseEvent(Component.java:6505)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3312)
        at java.awt.Component.processEvent(Component.java:6270)
        at java.awt.Container.processEvent(Container.java:2229)
        at java.awt.Component.dispatchEventImpl(Component.java:4861)
        at java.awt.Container.dispatchEventImpl(Container.java:2287)
        at java.awt.Component.dispatchEvent(Component.java:4687)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
        at java.awt.Container.dispatchEventImpl(Container.java:2273)
        at java.awt.Window.dispatchEventImpl(Window.java:2719)
        at java.awt.Component.dispatchEvent(Component.java:4687)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:729)
        at java.awt.EventQueue.access$200(EventQueue.java:103)
        at java.awt.EventQueue$3.run(EventQueue.java:688)
        at java.awt.EventQueue$3.run(EventQueue.java:686)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
        at java.awt.EventQueue$4.run(EventQueue.java:702)
        at java.awt.EventQueue$4.run(EventQueue.java:700)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:699)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)



There are plenty of these errors on Google that have to deal with libjaw but most of them have to do with Minecraft.
I have already tried all the path solutions that are posted on Google, unless I have done them wrong they do not work.

Any ideas or maybe you need more information…

Did you notice this

The application displays an error while trying to run it if you don’t have a 32bit Java Virtual Machine installed.
in Subclient

Thanks for the reply,

Yea I did notice that and even discussed it with the developer and he said it should now be working with 64bit java. He is kinda stumped and thinks it must be some environment variable in openSUSE so I though I would check here to see if anyone had ever seen that error.

In the mean time he is going to install openSUSE in a virtual machine and see what he can figure out.

if you use openJDK then try and “replace” it with oracle/sun java

As vazhavandan suggested, you should try Oracle Java and it will work. (You may not have to replace/change your System Java installation. You could just install in your home directory and try).

libjawt.so: cannot open shared object file: No such file or directory

That seems to be a pretty clear error.
Check for the existence of the file on your machine, if it exists then it’s likely a coding error (eg if the code works on other distros then the problem is likely a hardpath/relative path error).

If the file doesn’t exist on your machine, then the app installed without a required dependency… Go find a source for the file and install.

From the name, it’s likely a part of the Java Abstract Windows Toolkit (java awt).

HHTH,
TTSU

Last I heard which was about 6 mths ago as of this writing,
There should be 97%+ compatibility between openJDK and Sun Oracle Java, the main unresolvable diff is some kind of compilation issue (proprietary license making replacement difficult). This would be with Java 7 and later.

So, in theory there should be only a very tiny number of times when Sun Oracle Java will work when openJDK won’t, and those will generally be when something needs to be compiled.

And, in this case the AWT for each Java should be 100% compatible.

Should. :slight_smile:

HTH,
TSU

Yes, I have already check for the file. Doing a search with Dolphin I get like 9 of them listed.
Here are the paths:
/usr/lib64/jvm/jre-1.7.0-openjdk/lib/amd64 >>>>> This one is listed three times with the same path???
/usr/lib64/jvm/java-1.7.0-openjdk-1.7.0/jre/lib/amd64 >>>>> This one too???

/etc/alternatives/jre/lib/amd64

/etc/alternatives/jre_1.7.0/lib/amd64

/etc/alternatives/jre_openjdk/lib/amd64

The developer said he has developed it under openJDK using a MS OS and it should work with version 6 or 7.

you are mistaken there . Only “swing” components are truly cross platform. awt classes are not truly cross platform. sun has been encouraging use of swing instead of awt for a very long time now

The AWT uses a lot of the native commands of the platform that lends it a great amount of speed. But in order to convert it for use in other platforms, you must change the counterpart commands. Swing on the other hand uses pure Java code making it very portable across platforms at the cost of speed and performance.

source:- Difference Between AWT and Swing | Difference Between | AWT vs Swing

AWT is Java’s original set of classes for building GUIs
Uses peer components of the OS; heavyweight
Not truly portable: looks different and lays out inconsistently on different OSs
Due to OS’s underlying display management system

Swing is designed to solve AWT’s problems
99% java; lightweight components
Drawing of components is done in java
Uses 4 of AWTs components
Window, frame, dialog, ?
Lays out consistently on all OSs
Uses AWT event handling

source:- http://www.cs.binghamton.edu/~steflik/cs328/swing.ppt

No Look And Feel support. AWT is designed to use native components. Therefore, it depends on the system to provide Look And Feel support. If there are no such support on the target platform, there’s no way for AWT to change its look and feel.

source:- https://blogs.oracle.com/Swing/entry/awt_swt_swing_java_gui3

That is good news for openJDK movement :slight_smile:

I don’t doubt the advantages Swing might have over AWT (although FWIW I run into AWT issues regularly nowadays so <someone> isn’t getting the word) but that is only that… Swing vs AWT.

And, likely has little to do with AWT implementation in OpenJDK vs Sun-Oracle SE JDK.

The links are very old, they refer to JDKv4 (approx). A lot has changed since then, and most of all the progress OpenJDK has made in making progress towards full compatibility with Sun-Oracle (AFAIK even with Oracle’s direct help) so AFAIK the AWT should not be an issue with 7.

TSU

Did this today just in case it might work and I get the exact same error…Bummer.

Any other ideas anyone? Maybe it is a development error and not solvable by anything I do?

I downloaded it and tried it myself. It works.
Worked both on OpenJDK and Oracle Java.
The Subclient.sh file is not written correctly (it incorrectly resets the PATH variable). So, after untarring it under my home directory, I did the following:

cd subclient-0.10.4
java -jar Subclient.jar

Wow ok, this seems promising.
So you can actually hear sound?
Are you streaming from an external server as I am?
Obviously I know how to run the app as I stated in the first post, it starts up and functions fine but when you actually go to play a song nothing happens and the error is reported in the terminal.
Hmmm, what could be the difference in our set ups.

I did connect to an external server and I could play the song. However, the sound is not coming out from my speaker (this could be something else, I need to check). I can see that the song progress indicator is moving and I am able to stop/play etc. without any errors being thrown.

With OpenJDK, I got the same error you mentioned if I try to play any songs!

It works with Oracle Java without throwing any errors.

Which developer did you check with? subsonic or subclient?

I have been in an email conversation with Alejandro Celaya the developer of SubClient. He seems to be a mostly working with Windows so progress has been slow, he has said he is setting up openSUSE in a virtual machine atm.

It works with Oracle Java without throwing any errors.

I get the same error with either java kit.

I can see that the song progress indicator is moving and I am able to stop/play etc. without any errors being thrown.

I can change songs and the album art comes up etc… But the progress bar never moves and of course no sound.

Thanks for trying it out, maybe some progress will be made.

I am starting to think that the error I am seeing may have nothing to do with the current situation and there maybe just some problem with the app.

I’m more or less sure that this problem is related to openJDK. The program is using Java Native Access mechanism that is a different way of accessing native shared libraries without the standard Java Native Interface (JNI). It may be working in Windows where access control restrictions may not be as strict as Linux :wink: