Results 1 to 10 of 11
Hi..Im a Beginner in linux....Im using SUSE....
For my java Program.i give the input port name in windows..as COM1
But Linux does not Support..
In linux displayLike /dev/ttsy0,ttsy1..I give "/dev/ttsy0" ...
- 05-29-2009 #1Just Joined!
- Join Date
- May 2009
- Posts
- 8
Portname.
Hi..Im a Beginner in linux....Im using SUSE....
For my java Program.i give the input port name in windows..as COM1
But Linux does not Support..
In linux displayLike /dev/ttsy0,ttsy1..I give "/dev/ttsy0" its not working...
How to give the portname in linux.
Give the solution...
Thanks in advance
Sorry for my Bad English
- 05-29-2009 #2Linux User
- Join Date
- Jun 2007
- Posts
- 458
Try:
to find the list of available device nodes. Choose one you find most suitable.Code:ls /dev
"When you have nothing to say, say nothing."
- 05-29-2009 #3forum.guy
- Join Date
- May 2004
- Location
- arch linux
- Posts
- 18,099
oz
→ new members/users: read this first | new member faq
→ no private messages requesting computer support - post them on the forums!
→ please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.
- 05-31-2009 #4Linux Guru
- Join Date
- Jan 2009
- Location
- Dover, NH
- Posts
- 1,633
actually, "COM1" is /dev/ttyS0 in Linux land, that's TTY (lower case) for text terminal, S (upper case) for serial port, and 0 (zero) to say first port.
The thing with Linux is permissions. In many distros, including SuSE, users do not have access to the physical ports by default, they must be given permission to access them. This is just as easy as seeing what group the port devices belong to and adding the user to that group, e.g. in SuSE, to access the serial ports, a user must be a member of the group uucp.
Code:dcat@Server:/dev> ls -l ttyS* crw-rw---- 1 root uucp 4, 64 2009-05-19 18:10 ttyS0 crw-rw---- 1 root uucp 4, 65 2009-04-14 06:16 ttyS1 crw-rw---- 1 root uucp 4, 66 2009-04-14 06:16 ttyS2 crw-rw---- 1 root uucp 4, 67 2009-04-14 06:16 ttyS3 crw-rw---- 1 root uucp 4, 68 2009-04-14 06:16 ttyS4 crw-rw---- 1 root uucp 4, 69 2009-04-14 06:16 ttyS5 crw-rw---- 1 root uucp 4, 70 2009-04-14 06:16 ttyS6 crw-rw---- 1 root uucp 4, 71 2009-04-14 06:16 ttyS7 dcat@Server:/dev>
- 06-02-2009 #5Just Joined!
- Join Date
- May 2009
- Posts
- 8
Thanks
Hi Thanks for ur Reply..its useful to me....
- 06-02-2009 #6Just Joined!
- Join Date
- May 2009
- Posts
- 8
Port Open Error
Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException:
Error opening "/dev/ttyS1"
tcgetattr(): Input/output error
---
when i run a java code for port demo..the above following error arrised..what i do...
I give the permission to the ports, UUCP group also but its not working....
Reply.......
- 06-02-2009 #7
Do you have 2 serial ports? /dev/ttyS1 is the second port the first port would be /dev/ttyS0. In Windows the first port is com1.
- 06-02-2009 #8Just Joined!
- Join Date
- May 2009
- Posts
- 8
Port Open Error
Thanks....gogalthorp
For ur Reply....
In windows java coding run successfully.. portname COM1,COM2
Now i try that in Linux (SUSE)...
change the Portname as ttyS0,ttyS1...both the ports .....(/dev/ttyS0,/dev/ttyS1)
I put the related JARs,i give the permission but also....
can't open.....the above error arrives....What i do?......
some times this error also arrise
///////////////
Exception in thread "AWT-EventQueue-0" java.io.IOException: Not all params are supported by kernel
///////////
thanks in advance
- 06-10-2009 #9Just Joined!
- Join Date
- May 2009
- Posts
- 8
Java heap space
Hi Friends...........
-----------------
java.lang.OutOfMemoryError: Java heap space
java.io.ByteArrayOutputStream.<init>(ByteArrayOutp utStream.java:59)
org.apache.commons.fileupload.DeferredFileOutputSt ream.<init>(DeferredFileOutputStream.java:131)
org.apache.commons.fileupload.DefaultFileItem.getO utputStream(DefaultFileItem.java:55
org.apache.commons.fileupload.FileUploadBase.parse Request(FileUploadBase.java:406)
org.apache.struts.upload.CommonsMultipartRequestHa ndler.handleRequest(CommonsMultipartRequestHandler .java:233)
org.apache.struts.util.RequestUtils.populate(Reque stUtils.java:1209)
org.apache.struts.action.RequestProcessor.processP opulate(RequestProcessor.java:821)
org.apache.struts.action.RequestProcessor.process( RequestProcessor.java:254)
org.apache.struts.action.ActionServlet.process(Act ionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(Acti onServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet .java:709)
javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
-----------------
1. im using both Linux Open SUSE, Windows
2. How to increase Heap size or Solution for above error
- 06-10-2009 #10
You should always Google first
Setting Heap Sizes
note that it may be you have a programming error that is causing the memory exhaustion. 1) too many threads started but not ended 2) a recursing function that is not terminating in a reasonable amount of cycles.


Reply With Quote
