Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

CFScript and Initializing Java

Guest
May 02, 2008 May 02, 2008
Hello, I am currently generating barcodes successfully in CF 7. However, I'm trying to simply point the RBarcode reader (from java4less.com) to a .jpg and read the file. If anyone can help, it would be GREATLY appreciated.

For the required JAR files, go to:
http://www.java4less.com/vision/RVisionJava.zip (READER)
http://www.java4less.com/rbard10.zip (GENERATOR)

Someone has successfully done what I'm trying to do - but has done so in CF 8 (I'm using CF7). To see his code:
http://www.stillnetstudios.com/2007/12/15/2d-barcodes-coldfusion
367
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 02, 2008 May 02, 2008
I think I'm pretty close... but I keep getting the list of methods back from the cfscript:

array
- 1
- methods
toString (returns java.lang.String)
getValue (returns java.lang.String)
setValue (returns void)
getX (returns int)
getY (returns int)
setX (returns void)
setY (returns void)
getSymbology (returns int)
setSymbology (returns void)
hashCode (returns int)
getClass (returns java.lang.Class)
wait (returns void)
wait (returns void)
wait (returns void)
equals (returns boolean)
notify (returns void)
notifyAll (returns void)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
May 03, 2008 May 03, 2008
LATEST
aparsons wrote:

...
RImageData = myReader.scan(myImage.init(imageIO.read(inFile)));
return RImageData;

I think I'm pretty close... but I keep getting the list of methods back from the cfscript:


That is because scan() returns an array of BarCodeData objects. You have to loop through the array of java objects and call the desired methods to extract the data you need. If you look at the code for 2DBarCode_j4l.cfc, that is what the author is doing inside the readFromImage() function. He extracts the data and converts it to CF objects for easier use. Since the CFC is already written, have you tried adapting it to work with MX7?

BTW, you should VAR scope all function local variables to prevent thread/scope conflicts.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources