MinimServer Forum
OpenWRT or router install - Printable Version

+- MinimServer Forum (https://forum.minimserver.com)
+-- Forum: MinimServer (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: OpenWRT or router install (/showthread.php?tid=1361)

Pages: 1 2 3 4 5 6


RE: OpenWRT or router install - simoncn - 01-01-2015 21:38

(01-01-2015 19:42)alexinc Wrote:  alright, after copying jamvm to java, im getting what i feared:

root@NAS-Server:/usr/bin# /usr/share/minimserver/bin/startc
MinimServer: Java 7 or later is required: current version is 1.5.0
java.lang.reflect.InvocationTargetException
at java.lang.reflect.VMMethod.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:327)
at jamvm.java.lang.JarLauncher.main(JarLauncher.java:50)
Caused by: java.awt.AWTError: Cannot load AWT toolkit: gnu.java.awt.peer.gtk.GtkToolkit
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:607)
at javax.swing.plaf.basic.BasicLookAndFeel.initialize(BasicLookAndFeel.java:1720)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:912)
at javax.swing.UIManager.<clinit>(UIManager.java:245)
at org.jminim.launch.Launcher.reportErrorUC(Launcher.java:427)
at org.jminim.launch.Launcher.launch(Launcher.java:118)
at com.minimserver.launch.LaunchServer.main(LaunchServer.java:30)
at java.lang.reflect.VMMethod.invoke(Native Method)
...2 more
Caused by: java.lang.UnsatisfiedLinkError: Native library `gtkpeer' not found (as file `libgtkpeer.so') in gnu.classpath.boot.library.path and java.library.path
at java.lang.Runtime.loadLibrary(Runtime.java:763)
at java.lang.System.loadLibrary(System.java:670)
at gnu.java.awt.peer.gtk.GtkToolkit.<clinit>(GtkToolkit.java:177)
at java.lang.VMClass.forName(Native Method)
at java.lang.Class.forName(Class.java:233)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:583)
...9 more

The message "Java 7 or later is required" is as expected. The other errors seem to indicate a problem with how your Java installation is configured. These errors might be resolved by moving to a later level of Java.

The 'java" executable (or link) needs to be in a directory on your PATH. For most versions of Linux, /usr/local/bin is on the PATH. It seems this isn't the case for the OpenWRT firmware.


RE: OpenWRT or router install - alexinc - 05-01-2015 11:48

still struggeling with above failure, even after nice guys @openwrt forums were helping me with getting jamvm 2.0 running on my nas. would love first to try with older minimserver version which didn't require java 7+. could you help me plz with older download link for v0.8 linux embedded system? later on i need to research on AWT toolkit... :/
if you are interested, belonging thread can be found here: https://forum.openwrt.org/viewtopic.php?id=54849 i think it would be awesome to get running minimserver on openwrt, as it seems quite powerful with luci as frontend, which has nice support for minidlna - by far not as powerful as minimserver when it comes to serving audio! Wink

see last 2 screenshots: http://diantokam.blogspot.de/2012/11/openwrt-minidlna-server.html


RE: OpenWRT or router install - simoncn - 05-01-2015 12:32

(05-01-2015 11:48)alexinc Wrote:  still struggeling with above failure, even after nice guys @openwrt forums were helping me with getting jamvm 2.0 running on my nas. would love first to try with older minimserver version which didn't require java 7+. could you help me plz with older download link for v0.8 linux embedded system? later on i need to research on AWT toolkit... :/
if you are interested, belonging thread can be found here: https://forum.openwrt.org/viewtopic.php?id=54849 i think it would be awesome to get running minimserver on openwrt, as it seems quite powerful with luci as frontend, which has nice support for minidlna - by far not as powerful as minimserver when it comes to serving audio! Wink

see last 2 screenshots: http://diantokam.blogspot.de/2012/11/openwrt-minidlna-server.html

All MinimServer versions have required Java 6 or higher, so going back to an older version wouldn't help. Also, I can't provide any support for older versions.

On the other thread, I noticed this:

gnu classpath does not support full Java 7

I think this means you are unlikely to succeed with jamvm + classpath. Have you tried using Oracle Java SE Embedded? What CPU does your router have?


RE: OpenWRT or router install - alexinc - 05-01-2015 15:12

i tried java embedded successfully with FFP on original medion (zyxel) firmware, so cpu support shouldn't be the problem! Dual Core ARM PLX-NAS7820 750 MHz (http://www.mikrocontroller.net/articles/P89626) thats why i'm hunting for minimserver support on openwrt now! Wink when extracting now on openwrt like i did on medion firmware and recommended by uli (http://nas-tweaks.net/419/installation-of-java-on-the-nas-under-fun_plug/) i'm failing...
i guess next step is somehow compiling jamvm + openjdk classpath, as this is said to support java 7+ !?


RE: OpenWRT or router install - simoncn - 05-01-2015 17:10

(05-01-2015 15:12)alexinc Wrote:  i tried java embedded successfully with FFP on original medion (zyxel) firmware, so cpu support shouldn't be the problem! Dual Core ARM PLX-NAS7820 750 MHz (http://www.mikrocontroller.net/articles/P89626) thats why i'm hunting for minimserver support on openwrt now! Wink when extracting now on openwrt like i did on medion firmware and recommended by uli (http://nas-tweaks.net/419/installation-of-java-on-the-nas-under-fun_plug/) i'm failing...
i guess next step is somehow compiling jamvm + openjdk classpath, as this is said to support java 7+ !?

It sounds like you have tried running Oracle Java SE Embedded on OpenWRT. If this doesn't work, what is the problem?


RE: OpenWRT or router install - alexinc - 05-01-2015 19:27

ok, i'd like to test with embedded java again and would like to post my steps. maybe my mistake is somewhere in between?

i'm referring on this guide (http://nas-tweaks.net/419/installation-of-java-on-the-nas-under-fun_plug/), guess my biggest problem is setting the path for/in openwrt...

1. i'm downloading ejre-7u71-fcs-b14-linux-arm-sflt-headless-26_sep_2014.tar.gz from http://www.oracle.com/technetwork/java/embedded/embedded-se/downloads/index.html
2. mkdir /usr/share/java
3. cp ejre-7u71-fcs-b14-linux-arm-sflt-headless-26_sep_2014.tar.gz /usr/share/java
4. cd /usr/share/java
5. tar xzvf ejre-7u71-fcs-b14-linux-arm-sflt-headless-26_sep_2014.tar.gz
5. ln -s ejre1.7.0_71 jre
6. echo "export PATH=/usr/share/java/jre/bin:\$PATH" >> /etc/profile
7. reboot

root@OpenWrt:/# java -version
/bin/ash: java: not found

could adding the PATH to its right position solve all my troubles? Smile


RE: OpenWRT or router install - simoncn - 05-01-2015 21:01

(05-01-2015 19:27)alexinc Wrote:  ok, i'd like to test with embedded java again and would like to post my steps. maybe my mistake is somewhere in between?

i'm referring on this guide (http://nas-tweaks.net/419/installation-of-java-on-the-nas-under-fun_plug/), guess my biggest problem is setting the path for/in openwrt...

1. i'm downloading ejre-7u71-fcs-b14-linux-arm-sflt-headless-26_sep_2014.tar.gz from http://www.oracle.com/technetwork/java/embedded/embedded-se/downloads/index.html
2. mkdir /usr/share/java
3. cp ejre-7u71-fcs-b14-linux-arm-sflt-headless-26_sep_2014.tar.gz /usr/share/java
4. cd /usr/share/java
5. tar xzvf ejre-7u71-fcs-b14-linux-arm-sflt-headless-26_sep_2014.tar.gz
5. ln -s ejre1.7.0_71 jre
6. echo "export PATH=/usr/share/java/jre/bin:\$PATH" >> /etc/profile
7. reboot

root@OpenWrt:/# java -version
/bin/ash: java: not found

could adding the PATH to its right position solve all my troubles? Smile

What happens if you type:

/usr/share/java/jre/bin/java -version

If this works, the problem is with your PATH setting. You can check this by typing:

echo $PATH


RE: OpenWRT or router install - alexinc - 06-01-2015 17:49

nope, no success... Sad

root@OpenWrt:/# /usr/share/java/jre/bin/java -version
/bin/ash: /usr/share/java/jre/bin/java: not found

PATH seems to be setup the right way.

root@OpenWrt:/# echo $PATH
/usr/share/java/jre/bin:/usr/bin:/usr/sbin:/bin:/sbin


RE: OpenWRT or router install - simoncn - 06-01-2015 21:04

(06-01-2015 17:49)alexinc Wrote:  nope, no success... Sad

root@OpenWrt:/# /usr/share/java/jre/bin/java -version
/bin/ash: /usr/share/java/jre/bin/java: not found

PATH seems to be setup the right way.

root@OpenWrt:/# echo $PATH
/usr/share/java/jre/bin:/usr/bin:/usr/sbin:/bin:/sbin

It sems you either haven't installed the java executable in the expected location or you don't have the correct version of java. What output do you get from the following commands?

ls -l /usr/share/java/jre/bin/java
ls -l /usr/share/java/jre
ls -l /usr/share/java


RE: OpenWRT or router install - alexinc - 06-01-2015 22:38

root@OpenWrt:/# ls -l /usr/share/java/jre/bin/java
-rwxr-xr-x 1 10 143 3420 Sep 27 00:58 /usr/share/java/jre/bin/java
root@OpenWrt:/# ls -l /usr/share/java/jre
lrwxrwxrwx 1 root root 12 Jan 6 21:23 /usr/share/java/jre -> ejre1.7.0_71
root@OpenWrt:/# ls -l /usr/share/java
-rwxr-xr-x 1 root root 33542660 Jan 6 21:21 ejre-7u71-fcs-b14-linux-arm-sflt-headless-26_sep_2014.tar.gz
drwxr-xr-x 4 10 143 576 Jan 6 21:22 ejre1.7.0_71
lrwxrwxrwx 1 root root 12 Jan 6 21:23 jre -> ejre1.7.0_71