0

OS: Ubuntu 18.04.4 LTS

java -version gives:

openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)

A program i want to run, it needs rxtx-2.2pre2 version (an earlier librxtx-java version), so i downloaded the rxtx 2.2pre2 (prerelease) from http://rxtx.qbang.org/wiki/index.php/Download and downloaded it in my downloads folder, extracted it there and followed the instructions from http://rxtx.qbang.org/wiki/index.php/Installation_on_Linux , but when i use the command sudo sh ./configure, at some point it gives me the error:

./configure: line 21838: /usr/java/jre1.8.0_241/bin/javac: No such file or directory /usr/java/jre1.8.0_241 configure: WARNING: using JAVA_HOME environmental variable adjusted java.home is /usr/java/jre1.8.0_241 checking os.name  Error: Could not find or load main class conftest

checking os.arch  Error: Could not find or load main class conftest

checking java.vendor  Error: Could not find or load main class conftest

checking java.version  Error: Could not find or load main class conftest

checking os.version  5.3.0-42-generic ./configure: line 21808: cd: /usr/java/jre1.8.0_241/include: No such file or directory ./configure: line 21809: cd: /usr/java/jre1.8.0_241/include: No such file or directory

WARNING: configure is having a hard time determining which directory contains the file jni_md.h. Edit Makefile and fix the variable JAVANATINC to point to the correct directory.

The following options are available: find: '/usr/java/jre1.8.0_241/include': No such file or directory

If there are more than one option available the first was selected.

configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: executing depfiles commands 
soldy@soldy:~/Downloads/rxtx-2.2pre2$

It says /usr/java/jre1.8.0_241/bin/javac: No such file or directory. Indeed, there is no file named "javac" in this directory. the files in this directory are:

ControlPanel  javaws    jjs      orbd     policytool  rmiregistry  tnameserv
java          jcontrol  keytool  pack200  rmid        servertool   unpack200

Shall i change the code to look for one of the files that really exist in there? and if yes, which one?

1
  • 1
    It looks like you have installed only the JRE package - not the JDK package that includes javac Mar 27, 2020 at 13:28

2 Answers 2

2

You do not need to compile this package from source, it is packaged as librxtx-java with version 2.2pre2.

Just install it with:

sudo apt-get install librxtx-java

If you really need to compile it - install necessary build-tools with:

sudo apt-get install build-essential default-jdk
software-properties-gtk # to enable Source code
sudo apt-get build-dep librxtx-java

and then proceed.

2
  • I see.. i did that before, it gave me an error, i installed it again, since you saw me that link, and when i try to run a program ($sudo avr4l), it says: ` WARNING: RXTX Version mismatch NEXT_LINE: Jar version = RXTX-2.2-20081207 Cloudhopper Build rxtx.cloudhopper.net NEXT_LINE: native lib Version = RXTX-2.2pre2 ` Is the native lib Version, my version? Also, how do i see my version of txrx-java? Mar 27, 2020 at 19:47
  • I can't understand the original problem from your comment. Please ask it in new question.
    – N0rbert
    Mar 27, 2020 at 20:50
0

I downloaded rxtx 2.1-7r2 (stable) from http://rxtx.qbang.org/wiki/index.php/Download, followed the instruction from the downloaded file, also i needed to add java in the environment variable: https://stackoverflow.com/questions/35649140/make-bin-javac-command-not-found , follow the instructions here: http://rxtx.qbang.org/wiki/index.php/Installation_on_Linux and this eeror solved...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .