RM on ubuntu 18.04 [Solved]

Discussion forum for JP1 software tools currently in use, or being developed, such as IR, KM, RemoteMaster, and other misc apps/tools.

Moderator: Moderators

wnewell
Posts: 158
Joined: Tue Jan 13, 2009 2:42 pm
Location: DFW, Texas

RM on ubuntu 18.04 [Solved]

Post by wnewell »

Been a long time since I've been here. here's what I get when I try and run rmir now.
root@mythfe0:/home/wes/rm# java -jar RemoteMaster.jar
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.hifiremote.jp1.RemoteMaster (file:/home/wes/rm/RemoteMaster.jar) to method java.lang.ClassLoader.findLoadedClass(java.lang.String)
WARNING: Please consider reporting this to the maintainers of com.hifiremote.jp1.RemoteMaster
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
root@mythfe0:/home/wes/rm#
RM version 2.06 build 5
root@mythfe0:/home/wes/rm# java --version
openjdk 10.0.1 2018-04-17
OpenJDK Runtime Environment (build 10.0.1+10-Ubuntu-3ubuntu1)
OpenJDK 64-Bit Server VM (build 10.0.1+10-Ubuntu-3ubuntu1, mixed mode)
root@mythfe0:/home/wes/rm#
What am I doing wrong.
Last edited by wnewell on Thu Jun 21, 2018 1:19 am, edited 1 time in total.
Barf
Expert
Posts: 1524
Joined: Fri Oct 24, 2008 1:54 pm
Location: Munich, Germany
Contact:

Post by Barf »

You are using Java 10, which is not currently supported. IFAIK, only Java 7 and 8 (?) are supported. Install Java 8 and you will be OK.

Please do not run RM as root. If the system is set up correctly, everything runs as non-root, except for the parallel driver (but that is a bad idea anyhow).
yaworski
Posts: 454
Joined: Sun Jun 22, 2014 4:06 am
Location: Warsaw, Poland

Post by yaworski »

RMIR is compiled with Java 7 right now. Java 8 works for sure. I don't have Java 9 installed right now so I'm not able to test it right now, as I'm on a really poor Internet connection until Tuesday.

I've checked with Java 10 as I have it installed side by side with Java 6, 7 and 8 on my Arch and I can confirm that it doesn't work. I don't know if the reason is what's printed out as a WARNING or something else. This is only a warning and not an error. It needs some deeper investigation.

--edit--

I've compiled RMIR using JDK 10 but it still doesn't start. I've temporarily disabled the code causing the illegal access warning and it still doesn't start. So as I thought it won't be easy to port RMIR to Java 10. I've seen a lot of deprecation warnings during compilation so a lot of code would need to be rewritten.
Marcin
mdavej
Expert
Posts: 4631
Joined: Wed Oct 08, 2003 7:08 am

Post by mdavej »

3FG found the culprit a while back. Sounds like it may be an easy fix, changing to a different method of dynamically loading classes.
http://www.hifi-remote.com/forums/viewt ... 317#133317

But I suppose this also means once it's fixed, RMIR will only work with later versions of Java and not the earlier ones.
wnewell
Posts: 158
Joined: Tue Jan 13, 2009 2:42 pm
Location: DFW, Texas

Post by wnewell »

Thanks guys. Deleted java 10 and loaded 8 and all works now.
yaworski
Posts: 454
Joined: Sun Jun 22, 2014 4:06 am
Location: Warsaw, Poland

Post by yaworski »

Thanks mdavej for pointing that out. I read some info on the subject and after some changes in the code I'm now able to build RMIR under JDK 7 and run it on Java versions 7, 8 and 10 (as mentioned earlier, I don't have Java 9 installed, but shouldn't be a problem).

I can't make any tests right now as I don't have any remote with me, so I don't know if it fully works, but at least the GUI starts up correctly and there're no exceptions in the rmaster.err. The icons on the toolbar are also loaded correctly.
Marcin
mdavej
Expert
Posts: 4631
Joined: Wed Oct 08, 2003 7:08 am

Post by mdavej »

That's great news! Thanks, Marcin.
wnewell
Posts: 158
Joined: Tue Jan 13, 2009 2:42 pm
Location: DFW, Texas

Post by wnewell »

wnewell wrote:Thanks guys. Deleted java 10 and loaded 8 and all works now.
Well, I spoke before trying it with a remote. Getting the dreaded No remotes found. Tried different com ports, different jp1.2/3 cables, new batteries, etc. Same remotes I modded many years ago. No problem loading saved rmir files. Anyone got any ideas? Here's parts of rmaster.err.
RemoteMaster v2.06 build 5
Legacy merge set = true
System Properties:
java.version = 1.8.0_171
java.vendor = Oracle Corporation
os.name = Linux
os.arch = amd64
java.home = /usr/lib/jvm/java-8-openjdk-amd64/jre
java.class.path = /home/wes/rm/RemoteMaster.jar
Adding to classpath: file:/home/wes/rm/
Error parsing gtk-icon-sizes string: ''
Generating deviceImporter for protocol Blank
Generating deviceImporter for protocol Acer Keyboard
DevParm is Device
DevParm is Sub Device
**** Warning: multiple protocols with PID 00 5E and variantName ....
Starting normal download
Interface Name = JP1.X Serial
Port Name = /dev/ttyS0
Testing interface: JP1.X Serial
Interface matched. Trying to open remote.
Port Name = NULL
Failed to open
RemoteMaster.windowClosing() entered
Barf
Expert
Posts: 1524
Joined: Fri Oct 24, 2008 1:54 pm
Location: Munich, Germany
Contact:

Post by Barf »

wnewell wrote:Tried different com ports, different jp1.2/3 cables,...
It is hard to help you if you are not telling exactly what you try to do...
...
Interface Name = JP1.X Serial
Port Name = /dev/ttyS0
Testing interface: JP1.X Serial
Interface matched. Trying to open remote.
Port Name = NULL
Failed to open
RemoteMaster.windowClosing() entered
/dev/ttyS0 is on Linux a boda-fide serial port, somehow I doubt that you are using it. Assuming you are using a FTDI-like serial cable, this should show up as /dev/ttyUSB0 or similar. Try

Code: Select all

ls /dev/tty????
and tell us the outcome. (That's four literal question marks.)
wnewell
Posts: 158
Joined: Tue Jan 13, 2009 2:42 pm
Location: DFW, Texas

Post by wnewell »

I'm trying to download or upload to the rcrp05b remote like I did many years ago. Don't know why you want this, but here's all the serial ports.
wes@mythfe0:~$ ls /dev/ttyS*
/dev/ttyS0 /dev/ttyS14 /dev/ttyS2 /dev/ttyS25 /dev/ttyS30 /dev/ttyS8
/dev/ttyS1 /dev/ttyS15 /dev/ttyS20 /dev/ttyS26 /dev/ttyS31 /dev/ttyS9
/dev/ttyS10 /dev/ttyS16 /dev/ttyS21 /dev/ttyS27 /dev/ttyS4
/dev/ttyS11 /dev/ttyS17 /dev/ttyS22 /dev/ttyS28 /dev/ttyS5
/dev/ttyS12 /dev/ttyS18 /dev/ttyS23 /dev/ttyS29 /dev/ttyS6
/dev/ttyS13 /dev/ttyS19 /dev/ttyS24 /dev/ttyS3 /dev/ttyS7
But only 3 of them have actual uarts. S0, S4, and S5. I'm using ttyS0. Standard com1 in winspeak.
es@mythfe0:~$ setserial -a /dev/ttyS0
/dev/ttyS0, Line 0, UART: 16550A, Port: 0x03f8, IRQ: 4
Baud_base: 115200, close_delay: 50, divisor: 0
closing_wait: 3000
Flags: spd_normal skip_test
wes@mythfe0:~$ ls -l /dev/ttyS0
crw-rw---- 1 root dialout 4, 64 Jun 18 05:05 /dev/ttyS0

Any other info you need?
wnewell
Posts: 158
Joined: Tue Jan 13, 2009 2:42 pm
Location: DFW, Texas

Post by wnewell »

Oh, I'm not using a usb jp1 cable. I do jnow the difference between usb and rs232 ports. I have 2 of these cables.

https://www.diygadget.com/jp1-1-1-1-2-1 ... motes.html

Just for grins I opened read/write permissions to all on the port. No change.
wes@mythfe0:~$ ls -l /dev/ttyS0
crw-rw-rw- 1 root dialout 4, 64 Jun 18 15:43 /dev/ttyS0
Barf
Expert
Posts: 1524
Joined: Fri Oct 24, 2008 1:54 pm
Location: Munich, Germany
Contact:

Post by Barf »

Ok, that is a "real" serial cable. Are you sure that /dev/ttyS0 really corresponds to hardware? Today very few PCs have real serial interfaces. Can you check using something else?

Code: Select all

wes@mythfe0:~$ ls -l /dev/ttyS0
crw-rw-rw- 1 root dialout 4, 64 Jun 18 15:43 /dev/ttyS0
Modern Linuxes tend to undo that, at latest by the next reboot. Better is

Code: Select all

sudo usermod -aG dialout `whoami`
(at least on Fedora, I believe also on Ubunto).
wnewell
Posts: 158
Joined: Tue Jan 13, 2009 2:42 pm
Location: DFW, Texas

Post by wnewell »

Assuming you want to make sure I'm member of the dialout group. I already am.
wes@mythfe0:~$ groups wes
wes : wes adm dialout cdrom sudo dip video plugdev lpadmin sambashare mythtv
In case rm uses root to dialout I added root to the dialout group too. No change.

I might add that uploads and downloads stop working a few distros back. Don't remember exactly when, but at least a few years back. My original programing of the remotes with rm was probably around 2010 and I was using mandriva linux back then iirc, but it was on this same machine which I've had since ~2009. I just never needed to reprogram the remotes since then.
yaworski
Posts: 454
Joined: Sun Jun 22, 2014 4:06 am
Location: Warsaw, Poland

Post by yaworski »

If anyone is interested in testing a possible Java 9/10 fix, you can grab it here:
https://www.dropbox.com/s/bc7tfj5l58foa ... r.jar?dl=1

I've tested it under Java 7 and Java 10 with URC-6440 (JPS), URC-7980 (JP1.x serial) and Nevo C3 (CommHID) and everything seems to work.

PS. I'm sorry for using dropbox instead of the file section - I've tried uploading this multiple times and failed.
Marcin
wnewell
Posts: 158
Joined: Tue Jan 13, 2009 2:42 pm
Location: DFW, Texas

Post by wnewell »

Still no remotes found, but can confirm it runs ok on ubuntu 18.04 with java 8 or java 10 installed.
Post Reply