[jcifs] Some printer questions

Eric Glass eric.glass at gmail.com
Mon Jan 15 03:52:22 GMT 2007


I had a couple of questions around printing; I've hacked together what
I need to work, but looking for the "best" approach.

Basically, I'm generating PostScript via Java2D and dumping that to a
printer; I've gotten this to work by setting
jcifs.smb.client.useNTSmbs = false and then adding the following in
SmbTree.java (around line 75, where it is checking the "allowable"

    case SMB_COM_WRITE:

(apparently only SMB_COM_WRITE_ANDX is currently supported, causing
jCIFS to spit out "Invalid operation for LPT1: service" with NT SMBs
switched off).

I guess my question is, is there any "cleaner" way to do this?  Seems
funky to disable NT SMBs globally, and recompiling for a one-line
change is also a pain.  Any thoughts?


More information about the jcifs mailing list