<---- template headericclude ----->
Java Desktop class says printing not supported by this platform (F13)
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 1 of 1
  1. #1
    Join Date
    Aug 2010
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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 07:00 PM.

Similar Threads

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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
[[template footer(Guest)]]