I need help for printing service in Java

Hello :
I need to print some file from java program .
I did every thing , but when i run the program : it didn't return any printer as print service from the system, although I install 2 printers in my system.
by the way : i use Windows XP

I was in a rush this morning and forgot my crystal ball. Please post your code and remember to use the code tags.

Similar Messages

  • I need help for fax service in Java

    Hello :
    I need to know how to send fax from java program without using RFax but i can use javax.comm API .

    http://www.google.co.uk/search?q=java+fax
    Although this sounds like homework? So I suspect you are supposed to go about it yourself?

  • Need help for study work (About Java)

    Hello all,
    I am student and I am writing bachelor work for Riga Technical University (Java technology in telecommunications) and I want to know what will be the correct Java technologies about which I can write?
    Does anyone have idea or can give me content?
    Thanks.
    Regards,
    Girts

    I am student and I am writing bachelor work for Riga Technical University (Java technology in telecommunications) and I want to know what will be the correct Java technologies about which I can write?Ask your instructor.
    Seriously.
    I'm not intending any insult by being dismissive, but it just doesn't make sense to ask that question here. If you have questions about your academic curriculum, the place to resolve those questions are with your institution.
    Does anyone have idea or can give me content?If you're just hunting for ideas, do a little research to find a topic interesting to you and pertinent to your course. That's your responsibility as a student.
    That said, what I think would be a decent enough question for the forum would be, "I've done some looking into X as it relates to the Java platform, and I've come to the conclusion that Y. What issues, concerns, or feedback do you see regarding my conclusion?" And then people can answer and discuss as they choose.
    ~

  • Need help for printer application status

    Hi,
    I am using jdeveloper11.1.1.2.0.Actually standalone java application,I want to know status of the printer,If there is no paper inside printer then message should be display no paper in the printer,
    if i did printout but after 2 second i want to cancel the print then message should be also display ...
    my code is below..
    public void invokePrintJob(ActionEvent actionEvent) {
    // Add event code here...
    PrintService[] printers = PrintServiceLookup.lookupPrintServices(null, null);
    Boolean printerFound = false;
    for (int i = 0; i < printers.length && !printerFound; i++) {
    if (printers.getName().equalsIgnoreCase(getSelectedPrinter())) {
    printerFound = true;
    PrintService printer = printers[i];
    UploadedFile file = getTheFile();
    String fileName = getTheFile().getFilename();
    // String file = getTheFile();
    //PrintJobAdapter pr = new PrintJobAdapter();
    InputStream input;
    try {
    input = new BufferedInputStream((file.getInputStream()));
    Doc doc = new SimpleDoc(input, DocFlavor.INPUT_STREAM.PNG, null);
    PrintRequestAttributeSet attrs = new HashPrintRequestAttributeSet();
    attrs.add(new Copies(2));
    attrs.add(OrientationRequested.LANDSCAPE);
    JobName name = new JobName(fileName ,null);
    attrs.add(name);
    DocPrintJob job = printer.createPrintJob();
    PrintJobWatcher pjDone = new PrintJobWatcher(job);
    job.print(doc, attrs);
    pjDone.waitForDone();
    System.out.println("--------jobRunning-end----------");
    input.close();
    } catch (PrintException e) {
    System.out.println(e.getMessage());
    addFacesErrorMessage(e.getMessage());
    } catch (FileNotFoundException e) {
    System.out.println(e.getMessage());
    addFacesErrorMessage(e.getMessage());
    }catch (IOException ioe) {
    // TODO: Add catch code
    ioe.printStackTrace();
    public static class PrintJobWatcher {
    // true iff it is safe to close the print job's input stream
    boolean done = false;
    PrintJobWatcher(DocPrintJob job) {
    // Add a listener to the print job
    job.addPrintJobListener(new PrintJobAdapter() {
    public void printJobCanceled(PrintJobEvent pje) {
    System.out.println("-------printJobCanceled--------");
    allDone();
    public void printJobCompleted(PrintJobEvent pje) {
    System.out.println("------printJobCompleted---------");
    allDone();
    public void printJobFailed(PrintJobEvent pje) {
    System.out.println("----------printJobFailed-------");
    allDone();
    public void printJobNoMoreEvents(PrintJobEvent pje) {
    System.out.println("--------printJobNoMoreEvents---------");
    allDone();
    @Override
    public void printJobRequiresAttention(PrintJobEvent pje) {
    System.out.println("-----------printJobRequiresAttention----------");
    allDone();
    @Override
    public void printDataTransferCompleted(PrintJobEvent pje) {
    System.out.println("-------printDataTransferCompleted---------");
    allDone();
    void allDone() {
    // System.out.println("---------------");
    synchronized (PrintJobWatcher.this) {
    done = true;
    PrintJobWatcher.this.notify();
    public synchronized void waitForDone() {
    try {
    while (!done) {
    wait(1000);
    } catch (InterruptedException e) {
    e.printStackTrace();
    Please help me..

    Help with what? What's the actual problem?
    As far the code looks horrible. This kind of logic belongs in a fitler rather than a backing bean. You use empty strings instead of nulls. You stores passwords plain and unhashed in DB. You compares the password in Java instead of in DB. You stores password in a cookie. Your query is unsafe for SQL injections. You're reloading the driver class everytime when you acquire the connection. You're leaking DB connections. The application will crash sooner or later when the DB run out of connections.
    Is that all what you need to know?

  • Need help for printing/exporting in the right format

    Hi,
    i'm layouting a magazine for my graduation class.  And I almost finished it, but I've got a problem with printing it like I want it to be printed. I use the newest Trial Version of Adobe InDesign. The format of the magazine is A4, but when I export it as PDF (printing is the same) two pages (each A5) are exported on one horizontal A4 page. I want to have each page on one A4. Can somebody help me and say what I have to do, to get it work in my way?
    I hope you can help me, and I'm sorry if this is a silly question, but InDesign is a very complicated Software
    Thanks

    Exporting to PDF shouldn't resize the page. Does the exported PDF look the way you want it to?
    Here's all you need to know to export the file:
    File > Adobe PDF Presets > (pick a format - if you're printing from a desktop printer High Quality Print is a good choice)
    It might give you a warning about Transparency Blend Space which you can change under Edit > Transparency Blend Space
    Make sure spreads is not checked.
    If the problem is happening from Acrobat, check all of the settings in your print dialogue.
    Good luck!

  • Need help for http services

    Hi All,
    I am getting results from XML using http services
    see bellow
    EX:
    <mx:HTTPService id="simpletestFood"
    url="assets\foodlist.xml"
    result="foodList=simpletestFood.lastResult.list.food"/>
    But now i need to get data from java .
    So Could you please suggest me , how to integrate with java
    means in http service how to give my java(POJO) class--> methods
    name.
    And Please send me sample code for this.

    Here is a tutorial on the remote object service. HTH.
    http://www.flexlive.net/?p=92

  • Need help for customer service management for changing ship to party addres

    Hi All,
    I Have a bapi that will be called from web application craete service notification .
    business requirement is to change the shipping parner details with addition of name that
    will be notify person.I follwed this approach.
    1.Call the BAPI BAPI_SERVNOT_CREATE to create service notification.
    2.Call the BAPI_SERVNOT_SAVE to  save.
    3.BAPI_TRANSACTION_COMMIT
    4. Called function module ADDR_GET to get the address details of the ship to party.
    5.ALL FUNCTION 'ADDR_INSERT'to insert the modified address to sam memory.
    6.CALL FUNCTION 'ADDR_NUMBER_GET' to get the address no that will create a adrnr in sap
    table adrc.
    7.Called function module PM_PARTNER_UPDATE to update parten table that is ihpa.
    8.At last called the function module CALL FUNCTION 'ADDR_MEMORY_SAVE to save the
    address.
    Now the problem is when i open the transaction IW52 to see the notification created it
    has not the changed data but has standard ship to party detail.
    but there is an entry in adrc table for address created but when i see IHPA table the
    adrnr is not assigned to the notification no.
    Information is required thanks

    Hi Venkat
    Go to <b>VA02</b>, change the ship to party as SH02 on top screen itself so that it will be defaulted for all line items.
    Now make changes for rest of the items.
    But ensure that no subsequent document (delivery) is generated for any of the line items for which you are trying to change which is NOT possible.
    Thanks
    G. Lakshmipathi

  • Need help for generating textboxes in java script

    hii,
    yes,we are discussing about text boxes that are dynamically generated.the cursor should go from one textbox to another by pressing enter key.(suppose we are having three rows and three columns,
    and each column textboxes are having the same name,then the cursor should move from one textbox of first column first row to second row first column textbox ..& like that.That means the cursor should move downwards.
    if any one knows the code,please help me.

    hiii,
    To move cursor from one textbox to another text box ,I have take the length of the textboxes of the first column.I used onkeyDown event .
    in the function ,firest i checked the condition like
    for(i=0;i<form1.box.length;i++) //box is the name of the textboxes
    if(event.keyCode==13)
    form1.box[i+1].focus();
    return false;
    by using this the cursor is moving from first text box to secon textbox and stops.
    if i use event.returnValue=false; instead of return false ,then the cursor automatically going to the laxt textbox of the column.
    my problem is how i can focus the cursor from one textbox to another textbox one after the other till the end.
    if any one has solution please help me.
    thanx.

  • We are trying to implement a process so that any document that needs to be printed through our Java application will be printed as PDF using Adobe Reader. For which, We created and execute the below command line to call Adobe Reader and print the PDF on a

    We are trying to implement a process so that any document that needs to be printed through our Java application will be printed as PDF using Adobe Reader. For which, We created and execute the below command line to call Adobe Reader and print the PDF on a printer."C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe" /T "\\<Application Server>\Report\<TEST.PDF>" "<Printer Name>". Current Situation: The above command line parameter when executed is working as expected in a User's Workspace. When executed in a command line on the Application Server is working as expected. But, the same is not working while executing it from Deployed environment.Software being used: 1. Adobe 11.0 enterprise version. 2. Webshpere Application Server 8.5.5.2. Please let us know if there is a way to enable trace logs in Adobe Reader to further diagnose this issue.

    This is the Acrobat.com forum.  Your question will have a much better chance being addressed in the Acrobat SDK forum.

  • Need help for writing extract program

    hi
    i need help for writing extract program to retriew data from legacy system.
    i already developed bdc programs for me31k and me21.
    my requirement is to write extract program s for those t.codes.
    to retriew data from legacy system and stored in flat file.

    i need help with a java program. it is a program that allows the user to enter a student's GPA, number of extracurricular activities, and number of service activities. The user can not enter a gpa above 4.0 or below 0. The user can not enter a negative number for the number of both activities. If the student meets the following criteria: 1) GPA of 3.8 or above and at least one extracurricular activity and one service activity, 2) GPA below 3.8 but at least 3.4 and a total of at least three extracurricular and service activities, 3) GPA below 3.4 but at least 3.0 and at least two extracurricular activities and three service activities, the message "Scholarship candidate" should display. If the student does not meet the criteria above, then the message"not a candidate" should display. Can you help me, please?
    You haven't posted ANY 'java program' for us to help with.
    The forum is NOT a coding service. It is to help you with YOUR code.
    Post the code you have written and SHOW us (don't just tell us) how you compile it and execute it and the results you get. Then we can help you with any problems you are are having.
    If you need help understanding just what the program should be doing you need to ask your instructor to clarify the assignment.

  • I need to tell Print services to use the 2nd ethernet port

    I need to tell Print services to use the 2nd ethernet port
    Thanks in advance to anyone who can shed some light. My research has led me to a dead-end so far. Running 10.3.9 on my server. XServe Dual 2.3
    I want to have File services and the various other duties pushed through one ethernet port, and print services on the other. I know there is probably a config file to make one simple edit, but I can not find it, or perhaps a "defaults" type command.
    Also, where is this "command-line administration guide" that I keep running across on Apple's support?
    Thanks in advance.
    Matt

    Similar issue here too. Is it the subnet? Basically, I'm having a problem printing to an AirportExpress-served printer. Our network looks like this:
    (From Outside...>>>...to Inside)
    (Public IP) DSL Modem
    ...(10.0.0.x) Airport Express -- HP DesignJet 100 USB -- Airtunes/stereo
    ...(10.0.0.x) NetGear Wireless Router
    ...(10.0.0.x nic 0) Mac OS X Server (192.168.0.x nic1)
    ......(192.168.0.x) Mac OS X client
    ......(192.168.0.x) Mac OS X client
    ......(192.168.0.x) Mac OS X client
    The printer driver does not appear to be able to do IP printing, it assumes a direct USB connection. We can setup the OS X Server with the printer served by the Airport Express, as it is found via Bonjour, and then we share its queue via Server Admin. The problem is that the LAN clients cannot print to this server queue. The printer gets stopped at the server.
    If we turn OFF the OS X Server's firewall, printing works from both the clients and obviously from the Server. I think my question is this: what ports or services need to be turned on in order for the clients to print? There is no clear checkbox for "Bonjour Printer Sharing", and I'm curious what ports this would open, and if it would be safe. I thought it would work because we're pushing the print job up through the firewall, but apparently some response needs to come back through the firewall, and that's what's not happening.
    And to tack onto this, how could we also push iTunes to the Airport Express from the Clients? Assuming the music goes over different ports than the print jobs. ?
    Thanks in advance for any help.

  • We are trying to implement a process so that any document that needs to be printed through our Java application will be printed as PDF using Adobe Reader.

    We are trying to implement a process so that any document that needs to be printed through our Java application will be printed as PDF using Adobe Reader.
    For which, We created and execute the below command line to call Adobe Reader and print the PDF on a printer.
    "C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe" /T "\\<Application Server>\Report\<TEST.PDF>" "<Printer Name>".
    Current Situation: The above command line parameter when executed is working as expected in a User's Workspace.
    When executed in a command line on the Application Server, it is working as expected.
    But, the same is not working while executing it from Deployed environment.
    Software being used: 1. Adobe 11.0 enterprise version. 2. Webshpere Application Server 8.5.5.2.
    Please let us know if there is a way to enable trace logs in Adobe Reader to further diagnose this issue.

    This is the Acrobat.com forum.  Your question will have a much better chance being addressed in the Acrobat SDK forum.

  • I can't go further "waiting for Printer Services" on Mac OS X 10.3 can U?

    Evening, I'm a new user, and ocassionally use my iBook.I turned it on but it takes ONE HOUR to get to the prompt Waiting for Printing Services. I was advised to re boot but no success, I guess this all happened after i tried to update latest version.
    I appreciate if you can help!!!

    I am working on a friend's Ibook, I am a PC IT, and know very little about Mac's so please bare with me in helping (1st grade Mac user).
    In my Mac fixing journey, I have used:
    1. Repair Disk = no repairs found to fix
    2. Repair Permissions = stalls and gives a prompt disconnected quit and restart, did that same prompt
    3. Booted in safe mode, gets to the same point "waiting for Printing Services" and then fades out and shuts itself down after a long period.
    4. I have tried to holding down opt, apple, p & r keys to reset "pram" = no go.
    5. Removed the power source and batter to reset computer.
    6. Booted computer connected into the printer and not connected to the computer. Same freeze place.
    After all this being done,and reading alot in here, I purchased disk warrior, it corrected a few errors, rebuilt and rebooted...only to come back to "waiting for Printing Services" and then freeze.
    Anyone have anything else they can help me with, that might get me passed this problem??
    Thanks in Advance for any advice!!
    Sav
    Ibook G4   Mac OS X (10.0.x)  

  • Need Help for Blackberry8700g

    I need help for Blackberry8700g, It is the error message Java.lang.outofmemory Error. I can not make even phone calls. After reset it is same message pop up and does not off the power jum error523 

    You are in line to wipe and reload the OS on the BlackBerry.
    Follow the directions here and you will be fine.
    http://www.blackberryfaq.com/index.php/How_do_I_wipe_the_BlackBerry_using_Jl_Cmder%3F
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • I need help for Blackberry8700g

    New User! I need help for Blackberry8700g; It is the error message Java.lang.outofmemory Error. I can not make even phone calls. After reset it is same message pop up and does not off the power jum error523  100408 .I tried How_do_I_wipe_the_BlackBerry_using_Jl_Cmder%3F but it does not allow me to log in.Thanks,Rehan

    check this instruction:
    http://crackberry.com/blackberry-101-lecture-12-how-reload-operating-system-nuked-blackberry

Maybe you are looking for