# ZXing libraries cannot be detected

**URL:** <https://discourse.processing.org/t/zxing-libraries-cannot-be-detected/40226>\
**Category:** Libraries\
**Created:** [December 20, 2022, 11:54am UTC](https://discourse.processing.org/t/zxing-libraries-cannot-be-detected/40226 "2022-12-20T11:54:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Crimsic](https://avatars.discourse-cdn.com/v4/letter/c/3be4f8/32.png) [@Crimsic](https://discourse.processing.org/u/Crimsic)\
**Post date:** [December 20, 2022, 11:54am UTC](https://discourse.processing.org/t/zxing-libraries-cannot-be-detected/40226/1 "2022-12-20T11:54:28Z")

</div>

I am unable to figure out how to put these libaries into my folder, I’ve searched everywhere and I’ve tried all I could. I put the “core” folder inside the libaries folder currently. Can anyone help with a solution?

This is my code.

import processing.video._;  
import java.util.List;  
import com.google.zxing._;  
import com.google.zxing.client.j2se.BufferedImageLuminanceSource;  
import com.google.zxing.common.HybridBinarizer;  
import java.awt.image.BufferedImage;  
Capture video;

void setup() {  
size(640, 480);  
video = new Capture(this, 640, 480);  
video.start();  
}  
void draw() {  
if (video.available()) {  
video.read();  
BufferedImage image = (BufferedImage) video.getNative();

```
LuminanceSource source = new BufferedImageLuminanceSource(image);
BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source));

try {
  Result result = new MultiFormatReader().decode(bitmap);
  String barcode = result.getText();
  println("Barcode detected: " + barcode);
} catch (NotFoundException e) {
  // No barcode was detected
}

```

}  
}

No library found for com.google.zxing  
No library found for com.google.zxing.client.j2se  
No library found for com.google.zxing.common  
Libraries must be installed in a folder named ‘libraries’ inside the sketchbook folder (see the Preferences window).  
The package “com.google” does not exist. You might be missing a library.

---

<div class="post-metadata">

**Author:** ![mnse](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mnse/32/16520_2.png) [@mnse](https://discourse.processing.org/u/mnse)\
**Post date:** [December 20, 2022, 12:25pm UTC](https://discourse.processing.org/t/zxing-libraries-cannot-be-detected/40226/2 "2022-12-20T12:25:58Z")

</div>

Hi @Crimsic,

simply drag and drop the corresponding jar files onto the PDE Window.  
It will create then a code folder in you sketch directory which makes the libraries work.

Cheers  
— mnse

---

<div class="post-metadata">

**Author:** ![Crimsic](https://avatars.discourse-cdn.com/v4/letter/c/3be4f8/32.png) [@Crimsic](https://discourse.processing.org/u/Crimsic)\
**Post date:** [December 29, 2022, 4:20pm UTC](https://discourse.processing.org/t/zxing-libraries-cannot-be-detected/40226/3 "2022-12-29T16:20:29Z")

</div>

Hi @mnse ,  
Although I have dragged some of the jar files that was required, it still unable to detect the package. The requested files are folders so am I to assume to drag every single file into the PDE window?  
Thanks

---

<div class="post-metadata">

**Author:** ![mnse](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mnse/32/16520_2.png) [@mnse](https://discourse.processing.org/u/mnse)\
**Post date:** [December 30, 2022, 7:49am UTC](https://discourse.processing.org/t/zxing-libraries-cannot-be-detected/40226/4 "2022-12-30T07:49:46Z")

</div>

Hi @Crimsic,

At least the ZXing core and the ZXing javase jars as far as I can see from your code imports above.  
If something missing you need to check which jars else and also drop it onto the PDE window.  
In the end you should have a code directory in your sketch folder which have all the required jars located inside flat without subfolders.

Cheers  
— mnse

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [December 30, 2022, 8:11am UTC](https://discourse.processing.org/t/zxing-libraries-cannot-be-detected/40226/5 "2022-12-30T08:11:12Z")

</div>

![download](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/3/1/318fc0a5b062b84c188f9237cd28d529cc951d3f.png) @Crimsic,

Welcome!

I had just made a note about QRCodes for my work to do’s for new year.

It helps us help you if you:

- [Format your code](https://discourse.processing.org/faq#format-your-code) \< Open this link.
- Provide details about the the resources you are using; in this case the libraries.
- Details about your environment (OS, Processing version).

This worked here with Processing 4.1.1 and W10:

> **[zxing4processing - Processing Library - CAGE Web Design](http://cagewebdev.com/zxing4processing-processing-library/)**
>
> Salvatore Iaconesi and Rolf van Gelder created a Processing Library called ‘zxing4processing’. Processing is an open source programming language and environment for people who want to create images, animations, and interactions. The zxing4processing...

The toughest part was finding a QRCode that was printed so went to Google Images.

It is also here available with Processing in the Contribution Manager which is the easiest way to install:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/2/5/251d4e2b9ef36679a8a27a51c6b521232fe423fa.png)

I checked this after downloading and installing and looks like I did this correctly… says _3.5 installed_.

`:)`

---

<div class="post-metadata">

**Author:** ![erkosone](https://avatars.discourse-cdn.com/v4/letter/e/ba9def/32.png) [@erkosone](https://discourse.processing.org/u/erkosone)\
**Post date:** [December 30, 2022, 8:37am UTC](https://discourse.processing.org/t/zxing-libraries-cannot-be-detected/40226/6 "2022-12-30T08:37:36Z")

</div>

Remember that the BufferedImage class does not exist in Android and this library cannot be used in Android. A few weeks ago I ported this library to Android so that it would work well, it would be great if the official maintainer updated it…
