title: Java Web start printing job
body: <p>I posted about the same problem before but got no answer. I am re-posting because I think its a simple problem that someone must have came across recently.</p>
  
  <p>I have a JavaFX application that makes use of the awt.PrinterJob to print some Printable information. while on development everything works fine but when I sign the application and deploy it via Web Start clicking the same button to print the data just throws a Null pointer exception below:</p>
  
  <pre><code>Caused by: java.lang.NullPointerException
  at javax.print.PrintServiceLookup.getServicesForContext(Unknown Source)
  at javax.print.PrintServiceLookup.getListOfLookupServices(Unknown Source)
  at javax.print.PrintServiceLookup.getAllLookupServices(Unknown Source)
  at javax.print.PrintServiceLookup.lookupDefaultPrintService(Unknown Source)
  at sun.print.Win32PrintServiceLookup.getWin32PrintLUS(Unknown Source)
  at sun.awt.windows.WPrinterJob.getPrintService(Unknown Source)
  at sun.print.RasterPrinterJob.setPrintable(Unknown Source)
  at AdvancedSearchDetailedResultsTableViewController.printToImage(AdvancedSearchDetai..
  </code></pre>
  
  <p>I have another Java Swing app that I deploy the same way and its using the PrintJob with no issues. I thought that it could be something to do with JavaFX and awt but it works locally which made me think that it must have something to do with WebStart accessing printing services. I looked at JNLP API Printservices with no results.</p>
  
  <p>Previous post link <a href="https://stackoverflow.com/questions/17403727/java-web-start-printerjob">https://stackoverflow.com/questions/17403727/java-web-start-printerjob</a></p>
  
  <p>Any ideas or workarounds would be much appreciated.</p>
  
  <p>Thanks</p>