PortInUse Exception in SerialDemo


 
Thread Tools Search this Thread
Top Forums Programming PortInUse Exception in SerialDemo
# 1  
Old 11-27-2012
PortInUse Exception in SerialDemo

Using JRE 1.4.2_12 on SCO OpenServer 5.0.7, I was able to use the Java Comm Api to open and close serial ports. After upgrading to JRE 1.4.2_19, the Java Comm Api complains that the ports are in use. Does anyone have any thoughts on how to make 1.4.2_19 work with Java Comm API?
FYI. I was using the SerialDemo java program as a test.

Thanks in advance.
# 2  
Old 11-30-2012
After further testing, I am able to open the Serial Port while logged in as root, but not logged in as a user. Any help would be appreciated.
Thanks.
# 3  
Old 11-30-2012
This may be file permissions, check the permissions on the device file itself.
# 4  
Old 11-30-2012
I changed the owner to the user logged in.
I changed the group to a group that user has access to.
The permissions read crw-rw-rw-
No luck.

Also, I no longer believe this is a java issue. I did a fresh install of sco using java 1.4.2_12 and have the same behavior.
# 5  
Old 11-30-2012
Quote:
Originally Posted by rkelly
I changed the owner to the user logged in.
I changed the group to a group that user has access to.
What about the JVM, which their program techically runs inside?
# 6  
Old 12-03-2012
Thanks Corona but I guess I am not as familiar with SCO as I should be. How would I go about changing the permissions for the JVM? Is it simply a matter of finding the .exe file and changing it's permissions?

---------- Post updated at 07:36 AM ---------- Previous update was at 07:26 AM ----------

As a follow-up, I tried changing the permissions on /opt/java2-1.4.2/bin/java using chmod 777 java. That did not fix it.
Thanks.
# 7  
Old 12-03-2012
777 is not the magic sledgehammer to fix all permissions problems. You really need to change that back to what it was before someone accidentally edits the java binary. Smilie

What you did would not have fixed the problem even if the problem is the permissions of the Java runtime environment.

The question is, what user/group/permissions does the JVM run under?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Monitor logs for exception and if exception come then sent an email

Hi Folks, please advise , I have logs generated on unix machine at location /ops/opt/aaa/bvg.log , now sometimes there come exception in these logs also, so I want to write such a script such that it should continuously monitor these logs and whenever any exception comes that is it try to find... (3 Replies)
Discussion started by: tuntun27272727
3 Replies

2. SCO

Issue using SCO java SerialDemo

I recently installed the Java Communications API (v2.0Aa) on SCO and I'm having some issues running the SerialDemo application that comes with it. I can open a connection and send text from SCO to a toy windows app I wrote - that works fine. However, when I try and close the connection, I get... (2 Replies)
Discussion started by: jdsnatl
2 Replies

3. Shell Programming and Scripting

Re: exception using AWK

I have following file: NAME=ora.DG1.svc TYPE=ora.service.type CARDINALITY_ID=1 TARGET=ONLINE STATE=ONLINE NAME=ora.orlene.DG2.svc TYPE=ora.service.type CARDINALITY_ID=1 TARGET=ONLINE STATE=OFFLINE NAME=ora.MN.acfs TYPE=ora.registry.acfs.type TARGET=ONLINE (4 Replies)
Discussion started by: rcc50886
4 Replies

4. Solaris

solaris 7 exception

Hi all, An application works well under 2.6 but under 7 it gives TEXT_IO exceptions. (Is_Open, Check_Is_Open, Get_Line procedures). Any idea? Regards (3 Replies)
Discussion started by: endoavour
3 Replies

5. Programming

Exception Handling C++

Hello All, I have a question ....which I am totally confused about! If I have a fxn foo in a program which returns a logical value. But it has a posssiblity to throw some exception. Now my exception handler returns a value as a string stating why the exception occured. But my... (1 Reply)
Discussion started by: mind@work
1 Replies

6. Shell Programming and Scripting

Exception handling

Sometimes when I try to use curl to upload to an ftp server, I get the message: $curl -T file.wmv ftp.eu.filesonic.com --user user:password curl: (8) Got a 421 ftp-server response when 220 was expected How do I get the script to try again if I get the message curl: (8)? (2 Replies)
Discussion started by: locoroco
2 Replies

7. Shell Programming and Scripting

Exception Handling

Hi, I have written a script to load csv files into a mysql database, however, i would like for the shell script to exit in the event of an error (missing file, load error etc.) - currently if an error is encountered the next statement is processed - This is how i am loading the csv scripts ... (5 Replies)
Discussion started by: bertpereira
5 Replies

8. Shell Programming and Scripting

Perl Exception - $!,$?,$@

Hi, I am trying to understand the significance of the special variables $!,$@ and $? in perl. I have a code block as follows: eval { Code Segment 1: #authenticating to the remote server $ftpobj -> login($username,$password) or die "Can't login to $remote_host"; ... (12 Replies)
Discussion started by: DILEEP410
12 Replies

9. Linux

MMU exception

I hope to post in the right forum, otherwise I apologize for this. if a MMU exception is caused by a process which tries to access to other memory segment (out of its own address space) what the kernel does in this case ? maybe kernel kills the "bad" process ? (2 Replies)
Discussion started by: Puntino
2 Replies

10. UNIX for Dummies Questions & Answers

How to catch the exception

Dear friends, I am transferring some files to a windows system from Unix m/c thru FTP Script given below. echo "open $host quote USER $userid quote PASS $pwd $verbose $type cd $dir bin put $file close quit"|$ftp... (0 Replies)
Discussion started by: Vijayakumarpc
0 Replies
Login or Register to Ask a Question