Results 1 to 4 of 4
  1. #1
    Hussain Ali is offline Member
    Join Date
    Feb 2010
    Posts
    37
    Rep Power
    0

    Default Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\WINDOWS\system32\Aspris

    hii every one
    i m trying to extract data form image by using Asprise OCR libraries on Eclipse IDE with Windows xp 32 bit...
    but when i run program it geves a run time error
    like this...
    Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\WINDOWS\system32\AspriseOCR.dll: Can't find dependent libraries

    here is my program code

    Java Code:
    import java.io.File;
    import java.io.IOException;
    
    import javax.imageio.ImageIO;
    
    import com.asprise.util.ocr.OCR;
    
    
    
    //import com.asprise.util.ocr.OCR
    
    
    public class TestApp {
    
    	/**
    	 * @param args
    	 * @throws IOException 
    	 */
    	public static void main(String[] args) throws IOException {
    		System.out.println("Hello");
    		// loads the image.
    		BufferedImage image = ImageIO.read(new File("D:\\hussain\\Asprise-OCR-Java-Windows_XP_32bit-4.0\\sample-images\\ocr.gif"));
    		System.loadLibrary("AspriseOCR");
    		// recognizes both characters and barcodes
    		String s = new OCR().recognizeCharacters(image);
    		
    		// prints the results.
    		System.out.println("RESULTS: \n"+ s);
    
    
    
    	}
    
    }
    plz any body help me soon

  2. #2
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    684
    Rep Power
    6

    Default

    eclipse might be setting its own value for the java.library.path environment variable, and this is overriding what it is expected to be, or possibly you need to add this to the run configuration when eclipse launches this.
    does it work when this is launched from outside of eclipse ?

  3. #3
    Hussain Ali is offline Member
    Join Date
    Feb 2010
    Posts
    37
    Rep Power
    0

    Default

    can u plz tell me in detail
    actually i m new with eclipse
    plz tell me step by step

  4. #4
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    684
    Rep Power
    6

    Default

    Under the "Run" menu, "Run Configurations". This opens up a dialog.

    There should already be a java application run configuration on the tree on the left side of this dialog. find the one you want to run and select it.

    On the tab "Environment", select "New" button, enter "java.library.path" for the variable, and the full path to the folder containing the .dll, such as "C:\WINDOWS\system32\" in this case.
    I'm not sure, because I don't use Windows, if we are allowed to enter the backslashes "\" in the paths here, and if we need to use forward slashes instead.

    Note if this product has other DLLS installed into other locations such as under program files, it might require adding those folders to this value as well, use the ";'' (semicolin) to separate multiple entries.

Similar Threads

  1. Replies: 1
    Last Post: 11-20-2009, 08:58 PM
  2. Replies: 6
    Last Post: 07-16-2009, 04:30 PM
  3. Replies: 1
    Last Post: 07-16-2009, 11:35 AM
  4. Replies: 6
    Last Post: 08-18-2008, 07:44 AM
  5. Replies: 1
    Last Post: 08-07-2007, 08:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •