• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Asking for .jar file for PrinterJob

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I want to print string on paper with bluetooth printer and I want to use PrinterJob. But when I type PrinterJ in MainActivity.java the word PrinterJ become red and there is no PrinterJob on list. When I type Printer, there are PrinterCapabilitiesInfo, PrinterDiscoverySession, PrinterId, etc on list but there is no PrinterJob. May be I must import java.awt.printer.PrinterJob but I don't have its .jar file. Would you please tell where to download the .jar file?
 
Saloon Keeper
Posts: 7591
177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"MainActivity" sounds like an Android app - is that what it is? If so, Android does not support AWT or Swing, or any classes in those packages. Start learning about how to print from Android at https://developer.android.com/training/printing/
 
Charles Ongky
Greenhorn
Posts: 11
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you, Mr. Tim. I will learn how to print from the http that you give. Yes, I am learning creating android apps with Android Studio.
 
Marshal
Posts: 79242
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch
I shall move you to our Android forum.
 
Charles Ongky
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Mr. Campbell
 
reply
    Bookmark Topic Watch Topic
  • New Topic