473,406 Members | 2,345 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Trouble in serial java program on linux

Dear All,

I am running a java serial program ( Black Box on commapi package ) on a Linux. But when Main Menu can displayed, automatically program stop for running and I can't do anything with what's displayed, for examples: the button can't be pressed, the combo box can't be schrolled, etc. One thing that make me confused is threre's no error message at all, with all of happened.

I had done somethings like :
- put jar.com file on dir: usr/java/jdk/jre/lib/ext
- put javax.comm.properties file on dir: usr/java/jdk/jre/lib
- put libLinuxSerialParallel_g.so and libLinuxSerialParallel.so on dir: usr/lib
- set path on usr/java/jdk/bin
- set java home on usr/java/jdk

I had checked my current java with "which java" command and the result is suitable with path set.

I ran the Black Box program with command :
java -Djava.library.path=/usr/lib Black Box

where dir /usr/lib is directory that files .so located and Black Box is a class file name that is executed.

My question is : what's the trouble?? Is there in connection with respond rate of operating system that I used, because when my Black Box is executed on windows platform, the result is running and respond well.

My computer spec : Intel Pentium 4 with RAM 128 MB (but i'm not suggested that it's the reason).

Could somebody help me? I'll wait for your respond to solve the trouble, soon. Thanks a lot.

regards,
Endang Suryawati
Sep 16 '07 #1
3 2246
JosAH
11,448 Expert 8TB
I had a lot of trouble trying to run Sun's old comm API on linux boxes. It did run
fine (although a bit slow) on Windows boxes. Finally I replaced it all with the
RXTX package and all ran fine within a couple of minutes.

The RXTX API is identical to Sun's version; it just uses different package names.

kind regards,

Jos
Sep 16 '07 #2
Yup, Black Box sample is the only one that i'm sure it can running well anytime. The fact it can run on other computer, but when it runs on my computer is not running.

The first, I'm not sure about RXTX, but now I'll try to download and implement RXTX API for running my java serial application.

Thanks JosAH,

regards,
endang

I had a lot of trouble trying to run Sun's old comm API on linux boxes. It did run
fine (although a bit slow) on Windows boxes. Finally I replaced it all with the
RXTX package and all ran fine within a couple of minutes.

The RXTX API is identical to Sun's version; it just uses different package names.

kind regards,

Jos
Sep 16 '07 #3
JosAH
11,448 Expert 8TB
I just remembered: that BlackBox example needs to be edited a bit because the
names of the serial ports are different on both OSes: Windows: COM1 Linux: /dev/ttyS

Look at the source code, you'll see it immediately.

kind regards,

Jos
Sep 16 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: ^CeFoS^ | last post by:
Hello to everybody, I've done an application that draws in a frame the trajectory of a robot. The robot position is readed through the serial port, and several commands are wrote through the...
11
by: DrUg13 | last post by:
In java, this seems so easy. You need a new object Object test = new Object() gives me exactly what I want. could someone please help me understand the different ways to do the same thing in...
4
by: dalewz | last post by:
Hi, Could sb kindly answer my following questions: Plan: I am trying to find a language to build a GUI to communicate with our device via serial port. Questions: 1. which language (VC++...
8
by: Vivek Menon | last post by:
Hi, I am using a C program to write/read from a serial port. The writing part is working perfectly fine. However, I am not able to read the values correctly and display them. To debug this issue I...
13
by: Rob | last post by:
Hi all, I am fairly new to python, but not programming and embedded. I am having an issue which I believe is related to the hardware, triggered by the software read I am doing in pySerial. I...
6
by: I'mLost | last post by:
Hi! I need to create a simple program to check and monitor the state of the pins on a serial interface on a ups. I want to be able to tell what pins are in what state and when but I don't know...
9
by: Hal Vaughan | last post by:
I've done a fair amount of Googling for information on reading the serial port in C++ (and in Linux). Unfortunately, out of every 4 hits, 1 seems to be an unanswered question, 1 is someone saying,...
6
by: terry | last post by:
Hi, I am trying to send a character to '/dev/ttyS0' and expect the same character and upon receipt I want to send another character. I tired with Pyserial but in vain. Test Set up: 1. Send...
2
mrjohn
by: mrjohn | last post by:
Hey, I'm trying to make a program that will recognize when certain keys are released, so that I can encorperate it into a game I'm making. Unfortunately, it doesn't seem to be working. When I run the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.