Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Is the java PATH set correctly ?" problem. #26

Open
endcycles opened this issue Nov 25, 2021 · 0 comments
Open

"Is the java PATH set correctly ?" problem. #26

endcycles opened this issue Nov 25, 2021 · 0 comments

Comments

@endcycles
Copy link

endcycles commented Nov 25, 2021

I can run the Jar files directly from my SSH command line.

java -cp javase-3.3.3.jar:core-3.3.3.jar:jcommander-1.72.jar com.google.zxing.client.j2se.CommandLineRunner ../../../../../images/testimage.jpg
file:///home/earnrnet/public_html/barcode/vendor/dsiddharth2/php-zxing/src/bin/../../../../../images/testimage.jpg (format: PDF_417, type: TEXT):
Raw result:
6200868213185368
Parsed result:
6200868213185368
Found 8 result points.
  Point 2: (599.0,673.0)
  Point 3: (599.0,754.0)
  Point 6: (534.0,673.0)
  Point 7: (534.0,754.0)

This is my response when I run the PHP file:
Is the java PATH set correctly ? Current Path set is : /home/earnrnet/java/jdk-17.0.1/bin/java"

This is my Java version:

java 17.0.1 2021-10-19 LTS
Java(TM) SE Runtime Environment (build 17.0.1+12-LTS-39)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.1+12-LTS-39, mixed mode, sharing)

PATH has been setup and I can use java command within my SSH console.

which java command returns:

~/java/jdk-17.0.1/bin/java

readlink -f returns

/home/earnrnet/java/jdk-17.0.1/bin/java

I have tried the$realJavaPath = exec('readlink -f [FILEPATH]'); with no luck.

I also attempted to edit PHPZxingDecoder.php basePrepare() method from $this->getJavaPath() to java and it still won't work, throwing the same exact error.

@endcycles endcycles reopened this Nov 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant