Solve Linux Java read serial port permissions problem No permission to create lock File.__linux

Source: Internet
Author: User

When running Java read serial programs in the terminal or IDE, the following information is always reported:

[Lhwtouch@localhost root]$ java Main experimental:jni_onload called. Stable Library ========================================= Native lib Version = Rxtx-2.1-7 Java lib Version = Rxtx-2.1-7 che CK_GROUP_UUCP (): Error testing lock file creation error details:permission Deniedcheck_lock_status:no Permission to creat e lock file. Please see:how can I use the Lock Files with RXTX? In INSTALL

According to this hint, after finding the install file in the downloaded RXTX package, open with UE and find the following information "section":

Linux (only x86, x86_64, ia64-but more in the Toybox) Rxtxcomm.jar goes (In/jre/lib/ext java) under Goes In/jre/lib/[machine type] (i386 for instance) Make sure the user are in group lock or UUCP so lockfiles work. A is added to group lock or UUCP by editing/etc/groups. Distributions have various tools but this Works:lock:x:54:becomes:lock:x:53:jarvi,taj now Jarvi with Taj in group Lo Ck. Also make sure Jarvi and Taj have read and write permissions on the port.

The resolution steps are:

1: Find the groups file under/etc, but not found. Only group, group-these 2 files, where the group file is what we are looking for.

Open this file to modify the following 2 paragraphs:

UUCP:X:14:UUCP modified to Uucp:x:14:uucp,lhwtouch

LOCK:X:54: Modified to Lock:x:54:lhwtouch

After you modify this file, you must reboot the system to make it work.

Note:

1, I used the system for the successful linux2.6 Pu Hua

2, modify the Lhwtouch in the group file as the ordinary users of the system.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.