Find QR code in image and decode it using Zxing
<p>First of all, I read through all those topics how to use Zxing in Java but always got errors with missing com.google.zxing.client.j2se.* (I loaded the zxing core-3.2.1.jar in eclipse and all other zxing packages work unless j2se) or just found solutions for creating qr images...</p>

<p>My aim is to write one single method which gets an image file finds the qr code in this image, decodes the qr code and returns the string, basically it should be something like the following:</p>

<pre><code>import com.google.zxing.*;

public class QRCode {

    /*
     * ...
     */

    public String getDecodedString(SomeStandardImageType photo){
        // detect the qr code in a photo
        // create qr image from detected area in photo
        // decode the new created qr image and return the string
        return "This is the decoded dataString from the qr code in the photo";
    }

}
</code></pre>

<p>To sum up the method should get an image file like the following</p>

<p><a href="https://i.stack.imgur.com/4L7m2.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/4L7m2.jpg" alt="enter image description here"></a></p>

<p>and should return the url or if failed just "".</p>

<p>The code should be compatible with Zxing 3.2.1.</p>

<p><strong>Edit:</strong> The question is solved. For others who are interested in this I want to say that it is important to add both external jars <code>core-3.2.1.jar</code> <em>and</em> <code>javase-3.2.1.jar</code> to external jars. The answer by me works without the latter but depends on android image libs. </p>