Click here to Skip to main content
15,794,275 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
class mmm

    public static String myDir = "c:/temp/";
    public static void main(String[] args)
        // Set the paths
        String imagePath = "me.png";
        String resourcesFolderPath = "./resources/resources";
        OcrEngine ocr = new OcrEngine();
        ocr.setResource(new FolderStream(resourcesFolderPath));
        ILanguage language = Language.load("english");
        try {
            if (ocr.process()) {
            	System.out.println("\ranswer -> " + ocr.getText());
        } catch (Exception e) {

in this above code error
	at Source)
	at com.aspose.ocr.OcrEngine.a(Unknown Source)
	at com.aspose.ocr.OcrEngine.process(Unknown Source)
	at testing1.mmm.main("

how can i solve tis error
Updated 10-Oct-13 22:16pm
Richard MacCutchan 11-Oct-13 3:18am    
Study Java and learn how to check the results of method calls, and not to assume that they will always succeed. Which line of the above code snippet is line 36?
baliram bhande 11-Oct-13 4:48am    
i study java little bit but that error is not in java
Richard MacCutchan 11-Oct-13 5:09am    
That is a standard error in all languages. You have a reference object that does not point to anything: a NULL pointer. Look at the line where it occurred and that should identify the bad reference item.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900