NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: printing from java app



In article <1237988541.25919.28.camel@v250>,
Jeremy Smallman  <jeremy.smallman%doxsystems.com@localhost> wrote:
>Doing ktrace -i, then "kdump | grep lpt" produces nothing.
>
>Jeremy

I don't think it opens the serial port directly. I think that it looks
at the system printer services. Can you write a small program that uses
the java print services as described here:

http://www.javaworld.com/javaworld/jw-07-2005/jw-0725-print.html

and see if that simple example works? In anycase java should not SEGV
as your ktrace shows and this is a different problem. If you are running
current, you could try running one of the native jdks I have put on
ftp.netbsd.org.

christos

>
>On Tue, 2009-03-24 at 18:25, Christos Zoulas wrote:
>> In article <1237910883.14859.24.camel@v250>,
>> Jeremy Smallman  <jeremy.smallman%doxsystems.com@localhost> wrote:
>> >Thanks for the tip.  Here's what I found in one of the processes when
>> >trying to open the /dev/lpt0 port in the java app:
>> >                    .
>> >                    .
>> >                    .               
>> > 16935      1 java     CALL  gettimeofday(0xb65fee18,0)
>> > 16935      1 java     RET   gettimeofday 0
>> > 16935      1 java     PSIG  SIGSEGV caught handler=0xbbb9ef20
>> >mask=(3,33): code=SEGV_MAPERR, addr=0x4, trap=14)
>> > 16935      1 java     CALL  rt_sigreturn(0xb65fef40)
>> > 16935      1 java     RET   rt_sigreturn -1 errno -2 No such file or
>> >directory
>> > 16935      1 java     CALL  write(2,0xb65fcd9c,0x39)
>> > 16935      1 java     GIO   fd 2 wrote 57 bytes
>> >       "jpos.JposException: Can not open the communications port."
>> > 16935      1 java     RET   write 57/0x39
>> > 16935      1 java     CALL  write(2,0xb65fcdcc,1)
>> > 16935      1 java     GIO   fd 2 wrote 1 bytes
>> >                    .
>> >                    .
>> >                    .
>> >
>> >I'm running the java app as root so permissions shouldn't be an issue. 
>> >It seems the app thinks the port doesn't exist or it thinks the printer
>> >is not attached to the port . . .?  This java application works fine
>> >with the printer on an OpenSUSE box, so I know it's not a problem with
>> >the java app.
>> >
>> 
>> So what's the sequence from opening /dev/lpt0 on?
>> 
>> christos
>
>
>





Home | Main Index | Thread Index | Old Index