• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

Barcode Java library

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hope somebody has an answer.

1. I want to make a java app that produces a barcode.
   I have done some research, seems simple.

2. I only use a text editor like notepad++. But I need a java library to do this. "Barbecue"
   So how do I add the library so I can use it?
   and be able to compile and test run said app.
   Or do I need to write it on eclipse?

3. After I create said app, Can I turn it into a .jar and use that .jar on another system, that only has the JRE.
   meaning = I am making the app at home on a windows system, but I want to use said app at work on a mac.

Thank you to all for your help.
 
Rancher
Posts: 4754
38
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You should be able to compile, build and test your program outside of an IDE if you have all the dependency libraries on your PC.
Create batch (.bat) files to do the compile and the execution.
Here are some example bat files:


@REM compile with libraries
javac -cp .;D:\JavaDevelopment\Misc_Projects\Tesseract_OCR\Tess4J-3.4.8-src\Tess4J\lib\jna-4.1.0.jar;D:\JavaDevelopment\Misc_Projects\Tesseract_OCR\Tess4J-3.4.8-src\Tess4J\dist\tess4j-3.4.8.jar TesseractExample.java
MORE


And to execute:


Set CLASSPATH=D:\JavaDevelopment\Misc_Projects\Tesseract_OCR\Tess4J-3.4.8-src\Tess4J\lib\slf4j-api-1.7.25.jar;D:\JavaDevelopment\Misc_Projects\Tesseract_OCR\Tess4J-3.4.8-src\Tess4J\lib\jna-4.1.0.jar;D:\JavaDevelopment\Misc_Projects\Tesseract_OCR\Tess4J-3.4.8-src\Tess4J\dist\tess4j-3.4.8.jar;D:\JavaDevelopment\Misc_Projects\Tesseract_OCR\Tess4J-3.4.8-src\Tess4J\lib\jul-to-slf4j-1.7.25.jar;D:\JavaDevelopment\Misc_Projects\Tesseract_OCR\Tess4J-3.4.8-src\Tess4J\lib\jai-imageio-core-1.4.0.jar;D:\JavaDevelopment\Misc_Projects\Tesseract_OCR\Tess4J-3.4.8-src\Tess4J\lib\ghost4j-1.0.1.jar;D:\JavaDevelopment\Misc_Projects\Tesseract_OCR\Tess4J-3.4.8-src\Tess4J\lib\pdfbox-2.0.9.jar;D:\JavaDevelopment\Misc_Projects\Tesseract_OCR\Tess4J-3.4.8-src\Tess4J\lib\commons-logging-1.2.jar;D:\JavaDevelopment\Misc_Projects\Tesseract_OCR\Tess4J-3.4.8-src\Tess4J\lib\pdfbox-tools-2.0.9.jar;D:\JavaDevelopment\Misc_Projects\Tesseract_OCR\Tess4J-3.4.8-src\Tess4J\lib\lept4j-1.6.4.jar;D:\JavaDevelopment\Misc_Projects\Tesseract_OCR\Tess4J-3.4.8-src\Tess4J\lib\fontbox-2.0.9.jar
@REM
java -cp .;%CLASSPATH%  TesseractExample  SnippedPage2_Zoomed.png
MORE


The MORE at the end holds the command prompt window open so you can see any messages.

Use the jar command to create the .jar file.  Here is an example of a batch file:

@REM Make jar file for testing ImagesInBlob

SET JarName=%DEV_DRIVE%\JavaDevelopment\Misc_Projects\ImagesInBlob\ImagesInBlob.jar

jar -cmf ImagesInBlob.mnf  %JarName%  ImagesInBlob*.class

ECHO --- Created %JarName% ---
MORE

 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic