nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

Linux java apps: printing

This is a discussion on Linux java apps: printing within the Linux software forums, part of the Linux Getting Started category; I am using Slackware linux v 10.2 (kernel 2.6) and, for printing I use CUPS. This is configured OK (no ...


Go Back   nixCraft Linux Forum > Linux Getting Started > Linux software

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 11-29-2006, 01:22 AM
Junior Member
User
 
Join Date: Nov 2006
Posts: 4
Rep Power: 0
mike herdman
Default Linux java apps: printing

I am using Slackware linux v 10.2 (kernel 2.6) and, for printing I use CUPS. This is configured OK (no problems printing) except for all Java apps; these give a "print service not found" error. Can anyone point me in the right direction on this (I already posted to the CUPS list but nobody could help). I obviously have a configuration problem somewhere, but where?

Thanks,
Mike
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-29-2006, 01:47 AM
tom tom is offline
Contributors
User
 
Join Date: Jun 2005
Location: London, UK
Posts: 213
Rep Power: 0
tom is an unknown quantity at this point
Default

Last time I had same problem and it was solved by installing lpc command. Usually located in /usr/sbin/lpc

I think it was JAVA 2 SDK 1.4.xx.
Reply With Quote
  #3 (permalink)  
Old 11-29-2006, 01:55 AM
rockdalinux's Avatar
Contributors
User
 
Join Date: May 2005
Location: Bangalore
My distro: RHEL, HP-UX, Solaris, FreeBSD, Ubuntu
Posts: 564
Rep Power: 7
rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough
Default

print service not found - it means java app is not able to locate print service name - /etc/init.d/cups. You need to start service as follows:
/etc/init.d/cups start

Unfortunately /etc/init.d/cups name can be different for Slack. I am using Red Hat workstation. Try to set symlink as /etc/init.d/cupsys to /etc/init.d/cups using ln -s command. Type command:
Code:
ln -s /etc/init.d/cups /etc/init.d/cupsys
Test ur app...
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!

If you have knowledge, let others light their candles at it.

Certified to work on HP-UX / Sun Solaris / RedHat
Reply With Quote
  #4 (permalink)  
Old 11-29-2006, 02:02 AM
monk's Avatar
Senior Member
User
 
Join Date: Jan 2005
Location: Tibet
My distro: Debian GNU/Linux
Posts: 481
Rep Power: 5
monk will become famous soon enough monk will become famous soon enough
Default

it is little weird when you print on a Swing application it will through out
No print service found

I solved this problem by installing cupsys-bsd package under Debian Stable. Try to install cupsys-bsd or same name package under Slackware
Reply With Quote
  #5 (permalink)  
Old 12-07-2006, 02:01 PM
Junior Member
User
 
Join Date: Nov 2006
Posts: 4
Rep Power: 0
mike herdman
Default Linux java apps: printing

Many thanks to tom, rockdalinux and monk for your helpful replies.Unfortunately, none of the ideas worked (I have the equivalent of the Debian cupsys-bsd, lpc is correctly installed, and cups is running).

However, by playing around I found that I could print if I installed the Sun j2sdk 1.4.2 in place of the more recent jdk 1.5.0. Checking bug reports on the Sun website showed that this problem has been described before and supposedly fixed (see http://bugs.sun.com/bugdatabase/index.jsp) (bug ID 5109523 is particularly relevant). Proposed workarounds included:
1. disabling authentification in CUPS, or
2. using Jipsi to allow specifying a username/password to select an IPP print service.

Neither of these seems valid, particularly since Jipsi is no longer required by CUPS for discovering the print services. So I was left with the choice of using the old j2sdk 1.4.2 and being deprived of recent improvements (but being able to print) or forgetting about printing and using a recent Sun Java VM.

By chance I found that IBM release a Java VM: I installed their latest version (IBM j2se 5.0) and it works just fine! The print services are discovered, the printers are listed, no problem printing, and I have the feeling that the apps themselves run faster.

I will stick with IBM java VM,, but to satisfy my curiosity in this matter could you tell me which java versions you are/were using for successful printing?

Thanks again, look forward to your replies,
Mike
Reply With Quote
  #6 (permalink)  
Old 12-07-2006, 03:45 PM
tom tom is offline
Contributors
User
 
Join Date: Jun 2005
Location: London, UK
Posts: 213
Rep Power: 0
tom is an unknown quantity at this point
Default

It was 1.4.xx version for sure. It was Redhat Linux 2.1.
Reply With Quote
  #7 (permalink)  
Old 12-07-2006, 04:03 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
My distro: Any distro with shell
Posts: 917
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Hello,

Have you tried different Linux distros? I know JVM should work under any Linux distro but sometime things don't work under particular distro.

I know one large hospital they run Red hat workstation and with IBM JVM and they had some printing problem too. Since it was large installation (more than 500+ RH workstation) RedHat provided them some sort of patches.

Try switching distro; Few years back Blackdown JVM was quite hot http://www.blackdown.org/
__________________
Vivek | My personal blog
Linux Evangelist
Play hard stay cool
Reply With Quote
  #8 (permalink)  
Old 01-15-2007, 01:06 PM
Junior Member
User
 
Join Date: Nov 2006
Posts: 4
Rep Power: 0
mike herdman
Default

Thanks, I will try the Blackdown JVM.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
printing file in perl chandanperl Coding in General 3 04-16-2008 11:03 AM
Cups is not printing text file with proper format, staircasing issue Ashish Pathak CentOS / RHEL / Fedora 1 11-18-2007 08:12 AM
Looking Glass: Sun open source java desktop Ashish Pathak The Hangout 1 01-05-2006 06:46 PM
Need help with printing arrary in Ksh avcert1998 Shell scripting 4 08-18-2005 05:42 PM


All times are GMT +5.5. The time now is 04:43 AM.


Powered by vBulletin® Version 3.7.3 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36