JRE Not working with java program


9 posts
by BudgetRacing » Sun Sep 29, 2013 1:54 am
I thought the idea of the new java runtime was that we could run 32 bit java programs on the pi. I am trying to run the program from ecmLink (http://www.ecmtuning.com/downloads/inst ... 35_full.sh) and it keeps saying the archetecture or bitness (32/64) of the bundled jvm may not match your machine.

I'm fairly new to linux/pi so what am i doing wrong?
Posts: 9
Joined: Sun Sep 29, 2013 1:47 am
Location: Ontario, Canada
by RoyLongbottom » Sun Sep 29, 2013 9:30 am
You might find my experience with Java of interest (and could try my Java on-line and off-line benchmarks.

http://www.roylongbottom.org.uk/Raspber ... m#anchor13

Roy
Posts: 107
Joined: Fri Apr 12, 2013 9:27 am
Location: Essex, UK
by duberry » Sun Sep 29, 2013 10:12 am
BudgetRacing wrote:I'm fairly new to linux/pi so what am i doing wrong?


are you using raspbian ?

do you have java installed on you pi ?
to check
open a terminal
and type
Code: Select all
which java
( then hit enter key)


eg
i dont have java installed so i get no output when i try 'which java'

Code: Select all
me@me ~/Downloads $ which java
me@me ~/Downloads $
lend me your arms, fast as thunderbolts, for a pillow on my journey.
If the environment was a bank, would it be too big to fail
so long; and thanks for all the pi
User avatar
Posts: 380
Joined: Mon Jan 28, 2013 10:44 pm
Location: standing on a planet that's evolving. And revolving at nine hundred miles an hour
by BudgetRacing » Sun Sep 29, 2013 5:38 pm
duberry wrote:are you using raspbian ?


Yes i am using the latest version of raspbian.


duberry wrote:do you have java installed on you pi ?


The latest version has the hard float java pre installed.
Posts: 9
Joined: Sun Sep 29, 2013 1:47 am
Location: Ontario, Canada
by duberry » Sun Sep 29, 2013 6:03 pm
ecmlink_3_26_35_full.sh - 24mb !
from
Linux (complete install) Jan 3, 2013 24M SH
download
looks like a shell script with some sort of archive appended to the end of it
Code: Select all
cat ./ecmlink_3_26_35_full.sh | head -n 439


it seems this archive includes its own x86 32bit java runtime environment JRE,
that works on a linux x86 systems but not on the raspi !
because the pi has different architecture ( armv6 not x86 )


if you can install this on a linux pc ( x86 )
it should be possible to copy the installed files over to the raspberry pi
and run the .jar using the JRE for the raspberry pi
(ill try this later if i have the chance )

i hope that helps/makes some sense!



... it might also be possible for me or someone else ( possibly even ecmtuning.com if asked nicely)
to modify the ecmlink_3_26_35_full.sh install
to make it use the raspberry pi arm-JRE
lend me your arms, fast as thunderbolts, for a pillow on my journey.
If the environment was a bank, would it be too big to fail
so long; and thanks for all the pi
User avatar
Posts: 380
Joined: Mon Jan 28, 2013 10:44 pm
Location: standing on a planet that's evolving. And revolving at nine hundred miles an hour
by scruss » Sun Sep 29, 2013 6:25 pm
duberry wrote:it seems this archive includes its own x86 32bit java runtime environment JRE …


And, given that the OP is trying to talk through a serial/USB link to an engine management system, it's likely trying to use x86 device drivers embedded in the package. These could be picked apart mid-install by someone suitably inclined, and the armhf drivers (if they exist) substituted.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
User avatar
Posts: 317
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
by BudgetRacing » Mon Sep 30, 2013 5:44 am
scruss wrote:And, given that the OP is trying to talk through a serial/USB link to an engine management system, it's likely trying to use x86 device drivers embedded in the package. These could be picked apart mid-install by someone suitably inclined, and the armhf drivers (if they exist) substituted.



I ended up getting it running by installing it on my ubuntu system and copying the folder over to the pi. I swapped out the original librxtxSerial.so file for the one from the librxtx-java package. The program sees the adapter when i plug it in. When i try to connect the com light flashed on the adapter but it says it can't see the ECU. Apparently it needs to run at a baud rate of 15625 but i can't figure out how to change it.
Posts: 9
Joined: Sun Sep 29, 2013 1:47 am
Location: Ontario, Canada
by BudgetRacing » Mon Sep 30, 2013 5:45 am
There is an rxtx source code file on the DSMLink site but i have no idea what i am doing with that. Like i said i'm still new at linux.

http://www.ecmtuning.com/downloads/drivers/rxtx-src.tgz
Posts: 9
Joined: Sun Sep 29, 2013 1:47 am
Location: Ontario, Canada
by duberry » Mon Sep 30, 2013 9:10 pm
scruss wrote: and the armhf drivers (if they exist) substituted.

unusual it seems they do !
...
rxtx-src.tgz#PORTING wrote:This is PORTING Tue Nov 13 14:45:26 MST 2001

If you want to port rxtx to a new Unix platform do the following.
....
We will gladly help with any UNIX platform. Send questions to
email@removed-antispam.init. New OS's usually require tweaks.
lend me your arms, fast as thunderbolts, for a pillow on my journey.
If the environment was a bank, would it be too big to fail
so long; and thanks for all the pi
User avatar
Posts: 380
Joined: Mon Jan 28, 2013 10:44 pm
Location: standing on a planet that's evolving. And revolving at nine hundred miles an hour