javatwain may be a powerful solution
JavaTwain version
below is an simple example:
/*
* $Id: ExampleShow
*
* Copyright (c)
*
* This software is the confidential and proprietary information of
* Gnome spol
* Information and shall use it only in accordance with the terms
* of the license agreement you entered into with Gnome
*/
// JavaTwain package version
/**
ExampleShow demonstrates how to scan an image using defaults
from the Twain source
*/
import java
import java
import SK
public class ExampleShow extends Frame
{ Image image;
public void paint(Graphics g)
{ if (null!=image)
g
}
WindowListener windowAdapter=new WindowAdapter()
{ public void windowClosing(WindowEvent e)
{ System
}
};
public ExampleShow()
{ try
{ addWindowListener(windowAdapter);
setTitle(
// Open TWAIN select source dialog box
// and initialize the source selected by the user
TwainSource source=TwainManager
image=Toolkit
// wait for the image to be completed
MediaTracker tracker=new MediaTracker(this);
tracker
// this is the moment the scanner user interface pops up
System
try
{ tracker
}
catch (InterruptedException e)
{ System
e
}
tracker
System
setSize(image
setVisible(true);
TwainManager
}
catch (TwainException e)
{ e
}
}
public static void main(String[] args)
{ new ExampleShow();
}
}
From:http://tw.wingwit.com/Article/program/Java/Javascript/201311/25319.html