dsiddharth2 / php-zxing

PHP wrapper for Zxing Java library
MIT License
124 stars 25 forks source link

not work #11

Open uulucky opened 5 years ago

uulucky commented 5 years ago

/usr/bin/java -cp /download/php-zxing/src/bin/javase-3.3.3.jar:/download/php-zxing/src/bin/core-3.3.3.jar:/download/php-zxing/src/bin/jcommander-1.72.jar com.google.zxing.client.j2se.CommandLineRunner php-zxing/src/images/no_bar_code_found.jpeg

i do this command。 then cpu100%,after 60s timeout。

uulucky commented 5 years ago

i use ‘apt install default-jre’ install java on ubuntu 16.04,。 what is wrong? ths

uulucky commented 5 years ago

not found any error or waring?can y help me,thanks

dsiddharth2 commented 5 years ago

hi @uulucky thanks for reporting, I will check this and get back to you.

dsiddharth2 commented 5 years ago

@uulucky Did you try running a command in your terminal,

which java ?

If you did that then set java path as follows,

$decoder = new PHPZxingDecoder(); $decoder->setJavaPath("<PATH OF JAVA YOU GET FROM which java COMMAND ABOVE>"); $data = $decoder->decode('../images/Code128Barcode.jpg'); print_r($data);

Does this solve your problem?

uulucky commented 5 years ago

no,my java path is "/usr/bin/java",This operation is useless

uulucky commented 5 years ago

Can't I use it without a network? Does it support GB2312 encoding?