Use a scanner from Java

Hi all!, someone knows about an API that let me use a scanner from Java?
without programing JNI code.
thks in advance!.

The Java Twain package from http://www.gnome.sk does exactly what you need. You do not have to bother about jni, you can get an image from the scanner directly from your java application.
Erika

Similar Messages

  • Using word/excel from java (client or weblogic server)

    Hi everybody,
    i want to use excel / word functionality from java in two different variants:
    -> serverside
    -> clientside
    I tried the weblogic.comc and i got serveral classes but in the remote-package i got only a utitlity-class.
    My knowlege about COM is rather bad.
    Does anybody did this bevor and
    -> can say me, if it is correct, that i only got a utility-class (so how will i use it from the client ?!)
    -> has a example for using Excel / Word from Java in bea weblogic
    -> has a example for using Excel / Word directly in a client (not via rmi)
    Thanks
    Ciao
    Sven

    Sven, This is a really bad idea. Why don't you tell me
    what your trying to do and I wil surely give you a better alternative
    JRadecki
    "Sven Roesner" <[email protected]> wrote:
    >
    Hi everybody,
    i want to use excel / word functionality from java in two different variants:
    -> serverside
    -> clientside
    I tried the weblogic.comc and i got serveral classes but in the remote-package i got only a utitlity-class.
    My knowlege about COM is rather bad.
    Does anybody did this bevor and
    -> can say me, if it is correct, that i only got a utility-class (so how will i use it from the client ?!)
    -> has a example for using Excel / Word from Java in bea weblogic
    -> has a example for using Excel / Word directly in a client (not via rmi)
    Thanks
    Ciao
    Sven

  • Using Inbound IDOC from Java system creation of Outbound delivery

    Dear Experts,
    The scenario we are having is really very interesting. Hopefully its a good learning for me and also for others also.
    The scenario is,
    After sales order creation the details will be sent to one Non SAP system (Java) for performing some tasks related to forwarding agent decision, shipping date and etc. Once the details are finalized in that Java system then, the details needs to be transferred to SAP as "Inbound IDOC" process. For this proposed to use the SAP Jco middle ware.
    Once the details transfered from Java system to SAP then, the outbound IDOC needs to get generated automatically. Assuming the stock for that sales order line item is available. Also one more complexity is, our client is using custom transaction (ZVl10C) for delivery creation.
    Now Query is,
    1. Which IDOC, message type and Functional module needs to be used for creating the delivery automatically..??
    2. As per assumption, stock of that sales order line item should be available. Due to some business reason the stock was removed during inbound IDOC transfer then, what will happen to the IDOC..?. How to avoid this situation..??
    3. As we told we are re going to use SAP Jco b/w SAP & Java system. In this case, how the data will get transfered from Java system to SAP..?
    Thanks in advance for the replies I am going to get
    Regards,
    VEL

    Thanks for the feedback. This question is resolved

  • Using ExecutorService class from java.util.concurrent package

    Dear java programmers,
    I have a question regarding the ExecutorService class from java.util.concurrent package.
    I want to parse hundreds of files and for this purpose I'm implementing a thread pool. The way I use the ExecutorService class is summarized below:
    ExecutorService executor = Executors.newFixedThreadPool(10);
            for (int i = 0; i < 1000; i++){
                System.out.println("Parsing file No "+i);
                executor.submit(new Dock(i));
            executor.shutdown();
            try {
                executor.awaitTermination(30, TimeUnit.SECONDS);
            } catch (InterruptedException ex) {
                ex.printStackTrace();
            executor.shutdownNow();However, the code snippet above creates all the 1000 threads (Dock objects) at once and loads them to the executor, and thus I'm worrying about memory leak. I haven't tested it on 1000 files yet but just on 50 small ones, and even if the program prints out "Parsing file No "+i 50 times at once, it executes normally the threads in the background.
    I guess the write way would be to keep the number of active/idle threads in the executor constant (lets say 20 if the thread pool's size is 10) and submit a new one whenever a thread has been finished or terminated. But for this to happen the program should be notified someway whenever a thread is done. Can anybody help me do that?
    thanks in advance,
    Tom

    Ok I found a feasible solution myself although I'm not sure if this is the optimum.
    Here's what I did:
            ExecutorService executor = Executors.newFixedThreadPool(10);
            Future<String> future0, future1, future2, future3, future4, future5, future6, future7, future8, future9;
            Future[] futureArray = {future0 = null, future1 = null, future2 = null, future3 = null, future4 = null, future5 = null,
            future6 = null, future7 = null, future8 = null, future9 = null};
            for (int i = 0; i < 10; i++){
                futureArray[i] = executor.submit(new Dock(i));
            }I created the ExecutorService object which encapsulates the thread pool and then created 10 Future objects (java.util.concurrent.Future) and added them into an Array.
    For java.util.concurrent.Future and Callable Interface usage refer to:
    [http://www.swingwiki.org/best:use_worker_thread_for_long_operations]
    [http://www.particle.kth.se/~lindsey/JavaCourse/Book/Part1/Java/Chapter10/concurrencyTools.html]
    I used a Future[] Array to make the code neater. So after that I submitted -and in this way filled up- the first 10 threads to the thread pool.
            int i = 9;
            while (i < 1000){
                for (int j = 0; j < 10; j++){
                    if (futureArray[j].isDone() && i < 999){
                        try{
                            i++;
                            futureArray[j] = executor.submit(new Dock(i));
                        } catch (ExecutionException ex) {
                            ex.printStackTrace();
                        } catch (InterruptedException ex) {
                            ex.printStackTrace();
                try {
                    Thread.sleep(100); // wait a while
                } catch(InterruptedException iex) { /* ignore */ }
            executor.shutdown();
            try {
                executor.awaitTermination(60, TimeUnit.SECONDS);
            } catch (InterruptedException ex) {
                ex.printStackTrace();
            executor.shutdownNow();
        }Each of the future[0-9] objects represents a thread in the thread pool. So essentially I'm check which of these 10 threads has been finished (using the java.util.concurrent.Future.isDone() method) and if yes I replenish that empty future[0-9] object with a new one.

  • Call a C++ services using an uuid from java

    I need to call a C++ services which is using the UUID for RPC. The interface is having the UUID. The previous client program is also in C++, they have used RpcBindingFromStringBinding(UUID value, .,.,.) to call the interface. Right now I need to call this service from Java using the UUID. Can anyone help me in it.

    Passing the UUID should be the easy part, the tricky bit is performing an RPC from Java to C++. How are you doing that? Once you sort that out, passing arguments should be straight forward.
    Note: Java's RMI only works between a client server running RMI. To connect to C++ server, you need to use a Java client library which is compatible with your C++ server.
    If you still don't know how to perform the RPC call, I suggest you contact the people supporting the C++ program as they should know how RPC calls are made currently. If they don't know, it is highly unlikely we can guess a solution unless you are willing to change the C++ server to use a known RPC mechanism.

  • Error using DOS Command from Java

    Hi,
    I am using the following code to execute the DOS command to delete a file from Java.
    cmd = "del " + fileName;
    Runtime run = Runtime.getRuntime();
    Process proc = run.exec(cmd);
    Getting the following exception during runt time.
    Exception = java.io.IOException: CreateProcess: del D:\LAWDOCS\P50074\12\3\36857.3  error=2 --
    Can some body throw light on this?.
    Thanks,
    Jeyaraman R

    "del" is not an actual executable file, but instead a command in the command interpreter. So you can't just execute del like that, you have to run the command interpreter and tell it to execute the del command.
    If you are on windows NT, 2000 or XP, replace your command with "cmd /C del " + filename.
    If you are on Windows 95, 98 or ME, use "command /C del " + filename. (I am not quite sure if the switch for this is called /C on old windows version.)
    (But why not use File.delete()?)

  • Use Acrobat Reader from Java

    Hi everybody!
    Can anyone tell me, how I can call the Acrobat Reader from Java, open a pdf-document and make a snapshot fo the first page?
    I have to create an Image file of a page of a pdf-file.
    I already tried pdfbox and iText, both do not work.
    So using Acrobat seems to be the best solution, from my point of view.
    Any suggestions?
    Thx in Advance!
    Stef

    Jeah, I did, but nothing usefull there.
    Perhaps it is possible to open a pdf and save a sanpashot of one page as an image using commandline or jscript?
    Any hints, ides?
    Greetings
    Stef

  • Using MSXML parser from java

    All:
    I have a requirement to use MSXML parser [ shame there are great xml parser in java] from Java? Do anyone have experience using this combo? any sugesstions, reference, help would be greatly appreicaited.
    Thanks,
    Venki

    who on earth can put up such a @&#% requirement?
    (oops, i hope it's not my future boss!)
    MSXML is an ActiveX object - use Bridge2Java to call it (http://www.alphaworks.ibm.com/tech/bridge2java)
    but it's crapy, lousy and messy.

  • Using Oracle XQuery from Java Only

    Hi,
    I am interested to use the Oracle XQuery implementation to run on XML files only - no databases! Is it possible to do? Which jar file I need in JDeveloper to do that?
    Does it support the latest XQuery version?

    Our usecase is this :
    1. There would be some BPEL template files in XML with some placeholders for runtime parameters and XQuery FLWR expressions.
    2. At runtime, from Java, we would like to substitute those placeholders by runtime parameter values - would like to use the XQuery Java APIs to do that - see something similar available in Saxon XQuery parser.
    Is it possible from Java using Oracle technology?
    Thanks

  • Using mdx query from Java Apache

    Please suggest/guide me how to use MDX query to pull data from cube from Apache JAVA??
    BI GUY

    Hi BIGUY,
    Multidimensional Expressions (MDX) is the query language that you use to work with and retrieve multidimensional data in Microsoft Analysis Services. MDX is based on the XML for Analysis (XMLA) specification, with specific extensions for SQL Server Analysis
    Services.
    According to your description, it's hard to give your the exact MDX query to pull the data which you want from the cube since there are no any detail information about the cube. Here are some basic knowledge for your reference.
    Querying Multidimensional Data with MDX
    MDX Sample
    Regards,
    Charlie Liao
    TechNet Community Support

  • Preferred Uses of Structure from Java Dictionary

    Hello Friends ,
    I am confused about the scenarios where the structure can be used as the data type from the java dictionary
    It will be help full if could be known about some scenarios which could make the usage of structure clear

    Hi,
    Java Dictionary can be used as a central repository for cross-platform definitions of data types and database objects.
    Data type descriptions in the form of structures are used in Web applications and can be created in the Java Dictionary independently of the program code. Structures created in the Java Dictionary can be reused in different Web Dynpro contexts.
    This useful document link: https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00c062ec-f90d-2a10-52bd-df57de2d1ddb
    Regards,
    Anagha

  • Using unix rcp from java.

    Hi,
    I am trying to copy a file from a remote machine to the local file system in Java using rcp. I saw a post in this forum that talked about this, but no clear answer was ever posted. Currently we are trying to do this by using the .exec() class, but it doesn't work and doesn't throw an error either. Any help with this would be greatly appreciated.
    Thanks,
    Amber Taylor

    Runtime.getRuntime().exec(...) is the way to do it. However, there are a few pitfalls to take care of.
    You must capture all the output from the process, generally both on standard output and standard error, even if all you do is read the bytes from them and throw them away straight after. If you do not do this, chances are the process will either deadlock (and never finish), or die without failure.
    My suggestion is to handle those two streams in two separate threads, and use waitFor() on the thread you start the process from to wait for it to finish. Also, check the error code you get back from the process after waitFor() returns.

  • Using console program from java swing

    Can anyone please tell me if the following is possible and how to do it. I want to create a gui for mencoder and so for example i will be wanting toexecute mencoder from the swing app to find out the the auto crop values so i can visually display them. As well when i am actually encoding the files i want to somehow use the progress output from the program and visually display it in swing using a progress bar. I am just quiter sure where to start or even what doing this is called. I know it is possible just now how.
    Cheers
    Damian

    You can use Runtime.exec or ProcessBuilder to run external programs.
    If you do that, I'd suggest trying to use arguments to mencoder that change its console output to be easier to parse. I don't know if such an option exists, but many programs built for the command line provide such options, and mencoder certainly provides a lot of options. Block off a few weeks and you might make your way through a third of the manual.
    Also the mplayer/mencoder suite may provide a C library. I don't recall. If it does, you might be able to use JNI.

  • Sending PDF as attachment using Business workflow from Java WD

    Hi,
    It seems it is famous and known may be solved issue. But i am not able to conceptualize the information available. Thats why i am posting this. pls suggest me how to proceed.
    My scenario: I have an online intercative form in java webdynpro application where as once user completes data entry on send button click, i am triggereing an workflow of ECC6.0 which sends mail to MS exchange mail ID. Once user gets the form and complete comments section i have another application which allows user to upload the file which is similar to offline case. But  when i send the attachment i am getting mail with pdf attachment but when i open PDF i am getting error. And it seems PDF doesn't contain data(as size of pdf is 1 KB). and i tried to use xstring as input type.
    Can anyone pls guide me how to proceed.
    Regards
    Ravindra.

    A pdf file is definitely not a text file. Storing it in a Java String is a mistake.
    Is the "body" variable in your code a String? How does the data get into
    the String?

  • Using Unix commands from Java Application

    Hi,
    I need to write an Java application such that could run Unix commands in a Unix box.
    For example, my Java app needs to log in the Unix box, change directory (cd), create new folder (mkdir), list the current files in folder (ls), mount a new device (mount), etc.
    Thank you very much.
    Hung

    you can use java.lang.Runtime.exec to invoke OS commands, but if you're going to be completing a sequence that complicated and need to manage error handleing well, it might be best to just invoke a native method or write a shell script that does all of that stuff and then invoke that script via Runtime.exec . The Runtime class has limitations when you start invoking processes that require user input (like 'su'). Search the forums for more extensive examples on how to use Runtime.

Maybe you are looking for

  • Error while trying to assign a role via CUP in Portal

    Hello Experts, I am trying to  create a request to assign a role in EP via CUP ( 5.3) EP Connector is working fine as I have imported Portal roles etc SPML service is working fine I have done the  mapping in the Provisioning tab for Portal system log

  • Linux 11g red hat 5 SDO_TOPO_MAP.LOAD_TOPO_MAP fails

    Hi I think this is a bug in the linux build of oracle 11 - I have a script that works on my 11g windows install where I set timing onset verify off set echo offEXECUTE SDO_TOPO_MAP.CREATE_TOPO_MAP('F_DATA', 'F_DATA_TOPOMAP', 100, 21000, 100); EXECUTE

  • MRP information

    Hi, I am working on ECC 5.0 and got stuck with one of the client requirement. My client want to extract the information about the PO that are created because of some demand.MRP(dependent or independent requirement). Business process is that MRP run->

  • How To Call Function 'OnClick' of Button

    DWMX ... How do I call the function prc_SendEmail() written in VBScript above the head ... the following is the best I can do and, whilst the page shows, when I click the button, nothing happens and I get an Error on Page at bottom left of explorer p

  • Performancepoint custom list connection - no data

    Hi, I have created a custom list in sharepoint and I want to create a dashboard from it. I have opened up dashboard designer and created a Data connection to my list. I've tested the data source and my connection is successful. When I go to the view