I created a Java application and want to use barcode scanner in my Java application.
but don't have a device Barcode Scanner
How can I simulate a Barcode Scanner for testing my Java Application?
It really depends on how you want the scanner to connect to the system later on.
There are scanners that just use keyboard emulation. In that case you don't need to do anything (just make sure the right input box is active when expecting barcode input).
Other scanners connect to the system through a serial port emulation (for example, there's an USB to serial driver for Symbol/Motorola and Datalogic gun scanners). In that case, you open the serial port in Java and get scanner input as serial data. To simulate this, you'd have to connect your PC to another PC using a cross-over RS232 cable and could then use Hyperterminal/Putty/[whatever there is on linux or other OSs] to send data to your PC over the serial cable.