Fedora Linux Support Community & Resources Center
  #1  
Old 3rd December 2010, 05:56 PM
tja1618 Offline
Registered User
 
Join Date: Aug 2010
Posts: 30
linuxchrome
Java Desktop class says printing not supported by this platform (F13)

Hello all!

After quite a bit of searching, I haven't found any answers.

I have a java program which generates PDFs which I then want to print. However, apparently Java thinks printing isn't supported on my platform (Fedora 13 x86).

Basically, I find out with the following code:

Code:
Desktop desktop = null;

if (Desktop.isDesktopSupported()) {
	desktop = Desktop.getDesktop();
}

if (desktop.isSupported(Desktop.Action.PRINT)) {
	System.out.println("Printing is supported");
	desktop.print(new File(printP));
} else {
	//System.out.println("Printing NOT supported");
	JOptionPane.showMessageDialog(this, "Printing not supported on this platform!");
}
When running on my test machine desktop.isSupported(Desktop.Action.PRINT) returns false so that I get exceptions when I call desktop.print().

I've made sure that I have a default printer setup, and it works. I haven never had issues printing, just now from my app.

Any ideas? Is it a system configuration thing or a Java thing?

Some other info:
Code:
[tja@area51m ~]$ uname -r
2.6.33.8-149.fc13.i686
[tja@area51m ~]$ lpstat -d
system default destination: KONICA_MINOLTA_bizhub_223_7A_21_65_
EDIT: nevermind that bad code where I don't check to see if desktop is still null. ;P

Thanks!!!

Last edited by tja1618; 3rd December 2010 at 06:00 PM.
Reply With Quote
Reply

Tags
class, desktop, f13, java, platform, printing, supported

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set Java class path in Core 6? riff_almighty Using Fedora 9 17th September 2007 07:27 AM
How to instantiate Java class from XML file? tashirosgt Programming & Packaging 10 30th June 2006 06:55 PM
FC4 & KDE 3.5 = Platform not supported ! I hope Fedora 5 will Clunixchit Fedora Core 5 - Dev 8 4th January 2006 10:59 PM
Software RAID is NOT supported on this platform? lcgerke Installation, Upgrades and Live Media 8 21st June 2005 03:55 PM


Current GMT-time: 11:50 (Tuesday, 30-09-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat