-
Notifications
You must be signed in to change notification settings - Fork 104
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
Could not find or load main class com.google.zxing.client.j2se.CommandLineRunner #6
Comments
It appears I just don't know that much about java - I need to find where zxing got installed. |
Did you ever find a solution to this issue? |
@BrandonCopley: Were you running python-zxing on Windows or Linux? |
I am running this on Mac (Unix). However, it's been a long time since I've looked into this. |
Hmm, odd. The path separator should be the same on OS X as Linux, or at least I thought it was. What folders do/did you install zxing to? |
I installed the zxing to c:/zxing/"this is where the core and javase On Wed, Aug 12, 2015 at 1:34 PM, David Manouchehri <[email protected]
|
@BrandonCopley: Let me know if you have a chance to try it out again on OS X. I've removed all of the hard-coded separators, which should fix it. I might still be overlooking something. https://github.com/Manouchehri/python-zxing/tree/osx (I haven't tried my last commit, I wrote it on my tablet; should work though.) I'll probably get around to setting up a quick unit test to run on Travis CI as well. |
Hello, the link https://github.com/Manouchehri/python-zxing/tree/osx is leading to a 404 error... I am also getting this error "Error: Could not find or load main class com.google.zxing.client.j2se.CommandLineRunner" too when run the follow script: from zxing import * Error: Could not find or load main class com.google.zxing.client.j2se.CommandLineRunner I am on Mac... what could I do to fix it? |
I think you are not specifying the path were |
@chuckytah Ugh, that was my mistake... I deleted the branch since I thought I had already merged in the changes; turns out I didn't. I'll have to poke at this again later. |
Well i have used zbar now. I was able to use zxing but it was taking too Thanks anyway. Keep the good working. Ines
|
@Manouchehri This is so far in the past I have no idea what I was even trying to do here or use this library for, I apologize. |
I have the same issue, I put my python script in zxing/javase/python-zxing/ and didn't put any location when I initiate the BarCodeReader. Is there any solution for this? |
I got it to work by changing the following lines in libs = ["javase/javase.jar", "core/core.jar"]
args = ["-cp", "LIBS", "com.google.zxing.client.j2se.CommandLineRunner"] to libs = ["javase/javase.jar"]
args = ["-jar", "LIBS"] and then I ran Also @feliciaamy, BarCodeReader looks for the parent directory of |
Here are some instructions for zxing 3.3.2
|
git clone https://github.com/zxing/zxing.git go check for the latest versionwget http://central.maven.org/maven2/com/google/zxing/core/${version}/${version}.jar go check for the latest versionwget http://central.maven.org/maven2/com/google/zxing/javase/${version}/javase-${version}.jar must install java 8, if not a lots of debugging for java 11/12After building, in the javase/ directory, execute mvn -DskipTests package assembly:single to create a single JAR file containing all classes needed to run client command line apps, as target/javase-x.y.z-jar-with-dependencies.jar. Run CommandLineRunner with simply: java -jar target/javase-x.y.z-jar-with-dependencies.jar [URL | FILE] Eg: ['java', '-jar', './zxing-zxing-3.4.0/javase/target/javase-3.4.0-jar-with-dependencies.jar', '--try_harder', './samples/1.jpg'] modifylibs = ["javase/target/javase-3.4.0-jar-with-dependencies.jar"] pass in zxing as main root |
I am getting this error when trying to run this code - it appears zxing is installed:
computer$ java -cp javase/javase.jar:core/core.jar com.google.zxing.client.j2se.CommandLineRunner
Decode barcode images using the ZXing library
usage: CommandLineRunner { file | dir | url } [ options ]
--try_harder: Use the TRY_HARDER hint, default is normal (mobile) mode
--pure_barcode: Input image is a pure monochrome barcode image, not a photo
--products_only: Only decode the UPC and EAN families of barcodes
--dump_results: Write the decoded contents to input.txt
--dump_black_point: Compare black point algorithms as input.mono.png
--crop=left,top,width,height: Only examine cropped region of input image(s)
The text was updated successfully, but these errors were encountered: