MATLAB: Does printing from SUSE linux using the figure window or the MATLAB editor drop down fails with Java exceptions

cupsexceptionjavalinuxMATLABprintsuse

The following exceptions are generated when trying to print from a figure:
java.lang.IllegalArgumentException: services must be non-null and non-empty
at javax.print.ServiceUI.printDialog(Unknown Source)
at com.mathworks.page.export.printdlg.Printdlg.setVisible(Printdlg.java:453)
These exceptions are generated when trying to print from the editor:
Exception in thread "AWT-EventQueue-0"
java.lang.IllegalArgumentException: services must be non-null and non-empty
at javax.print.ServiceUI.printDialog(Unknown Source)
at com.mathworks.widgets.SyntaxTextPaneBase.printDocument(SyntaxTextPaneBase.java:2027)
at com.mathworks.widgets.SyntaxTextPaneMultiView.printDocument(SyntaxTextPaneMultiView.java:663)
at com.mathworks.mde.editor.EditorView.doPrint(EditorView.java:1127)

Best Answer

These errors may occur when the print system is set up to use CUPS with authentication. If the CUPS system is set up to require user names and/or passwords then Java is unable to determine the printer.
To work around this issue, the 'AuthType' defined in the file
/etc/cups/cupsd.conf
(default location) should be set to 'None'.