What is the procedure for having a Hecl on a Blackberry ?
Following the instructions, I build with
ant -propertyfile ./blackberry.properties blackberry
Ehm, what does it build?
I mean, what should be transferred to the device ?
I find in build/blackberry/final/bb
a Hecl.jar, a Heclgui.jar and a Hecl.jad (among others).
I'd thought these would be it, but trying installing OTA
(Over-The-Air), the device looks for the Hecl.cod and Hecl-1.cod
that are referenced in the the .jad file.
Looking around, the only .cod file is: jars/blackberry/Hecl.cod
What's more strange, is that this file is not a COD file at all!
It's a ZIP file, containing a Hecl.cod and a Hecl-1.cod files!!
Oh, and next to this COD-which-isnt-COD-but-ZIP there is another
Hecl.jar.
At this point, I"m thoroughly confused...
--
-- zvr --
-- +---------------------------+ Alexios Zavras (-zvr-)
| H eytyxia den exei enoxes | z...@zvr.gr
+-----------------------zvr-+
> I mean, what should be transferred to the device ?
> I find in build/blackberry/final/bb
> a Hecl.jar, a Heclgui.jar and a Hecl.jad (among others).
The stuff in 'build' is an intermediary step and not generally the
'final result'. Well, it is, but it is then copied to:
> I'd thought these would be it, but trying installing OTA
> (Over-The-Air), the device looks for the Hecl.cod and Hecl-1.cod
> that are referenced in the the .jad file.
>
> Looking around, the only .cod file is: jars/blackberry/Hecl.cod
> What's more strange, is that this file is not a COD file at all!
> It's a ZIP file, containing a Hecl.cod and a Hecl-1.cod files!!
Yes, but that's how .cod files work, believe it or not.
http://www.thinkingblackberry.com/archives/214
Is what I found when looking around - it seems to explain what is
happening, which is indeed weird.
But yes, you have found the correct file. To actually work on a
device it needs to be signed, but it will work on the emulator without
that.
> Oh, and next to this COD-which-isnt-COD-but-ZIP there is another
> Hecl.jar.
>
> At this point, I"m thoroughly confused...
Blackberry is a bit strange:-) I keep running into these things
myself. They are very nice devices, but certainly weird and not
standard in some ways.
--
David N. Welton
http://www.dedasys.com/
Sent from Padua, Veneto, Italy
the contents of the two dirs (intermediate and final) are:
$ ls -1sk ./build/blackberry/final/bb/
total 560
4 BrowserCmd.class
8 Hecl.class
244 Heclgui.jar
4 Hecl.jad
256 Hecl.jar
8 hecl_logo.png
4 Hecl.png
4 InvokeCmds.class
4 org
16 script.hcl
8 ServiceBookCmd.class
$ ls -1sk ./jars/blackberry/
total 420
116 Hecl-1.debug
152 Hecl.cod
4 Hecl.csl
4 Hecl.cso
128 Hecl.debug
16 Hecl.jar
So, even if the .COD file is the equivalent of the JAR file,
the .jad file never gets copied.
And what is the small .JAR file in the final dir ?
> Yes, but that's how .cod files work, believe it or not.
> http://www.thinkingblackberry.com/archives/214
from that same page:
"if you're not attached to a BES and want to download it directly
to your device, you're out of luck"
this means that OTA won't work for these big CODs-that-are-ZIP.
and that's what I've witnessed: the device asks the server
for the Hecl-1.cod file separately.
I assume you only tried the direct (usb) transfer ?
the penultimate paragraph on the same page says that the solution
is to have the contents of the ZIP file extracted again :-)
maybe I should also check the proposed BB-ant-tools:
http://bb-ant-tools.sourceforge.net/
> But yes, you have found the correct file. To actually work on a
> device it needs to be signed, but it will work on the emulator without
> that.
You also need the .jad file along,
if you want to make it available OTA.
> Blackberry is a bit strange:-) I keep running into these things
> myself. They are very nice devices, but certainly weird and not
> standard in some ways.
All the more reason to have Hecl running there,
so that people can be spared this aggravation :-)
Good question:-) The BB stuff is new and I'm still figuring out what
does what and why. The files in .ars/ are all the result of this
'code' in blackberry.xml:
<java jar="${jde.home}/bin/rapc.jar" fork="true" dir="${bb.rel}">
<arg value="import=${jde.home}/lib/net_rim_api.jar"></arg>
<arg value="codename=Hecl"></arg>
<arg value="-midlet"></arg>
<arg value="../../${j2me.hecl.jad}"></arg>
<arg value="../../${j2me.hecl.jar}"></arg>
</java>
>> Yes, but that's how .cod files work, believe it or not.
>> http://www.thinkingblackberry.com/archives/214
>
> from that same page:
> "if you're not attached to a BES and want to download it directly
> to your device, you're out of luck"
>
> this means that OTA won't work for these big CODs-that-are-ZIP.
> and that's what I've witnessed: the device asks the server
> for the Hecl-1.cod file separately.
> I assume you only tried the direct (usb) transfer ?
>
> the penultimate paragraph on the same page says that the solution
> is to have the contents of the ZIP file extracted again :-)
>
> maybe I should also check the proposed BB-ant-tools:
> http://bb-ant-tools.sourceforge.net/
I had a quick look at those but discarded them because they just
seemed to add more complication. Maybe it's time for another look.
>> But yes, you have found the correct file. To actually work on a
>> device it needs to be signed, but it will work on the emulator without
>> that.
>
> You also need the .jad file along,
> if you want to make it available OTA.
Yeah, that's definitely an important point.
>> Blackberry is a bit strange:-) I keep running into these things
>> myself. They are very nice devices, but certainly weird and not
>> standard in some ways.
>
> All the more reason to have Hecl running there,
> so that people can be spared this aggravation :-)
Yes!
I am probably way over my head, as usual, and talking about something
very different, but I downloaded Hecl a short while ago, copied Hecl.jar
from jars/applet/cldc1.1-midp2.0 to my web server, and installed it on
my BlackBerry Tour.
Most of the examples I have tried work. The exceptions are Information
and Settings. I had thought maybe an unsigned program would not have
access to the phone system, but the Call routine worked (with two
warnings requiring Allow to be clicked on).
Pretty neat!!
Gerry
Well, the 'call' routing is simply doing a midlet.platformrequest:
midlet.platformrequest "tel:+393488866859"
And that actually ought to work on all phones.
The problem is that there are a lot of blackberry API calls which
require signed code, and the .cod files are the best way to do that.
What I hope to achieve in the near future is this: a signed cod file
that can read and execute files off the filesystem, so that the user
can simply replace/edit those files. This way they get both access to
the methods requiring signed code, and still maintain flexibility.
>> But yes, you have found the correct file. To actually work on a
>> device it needs to be signed, but it will work on the emulator without
>> that.
>
> You also need the .jad file along,
> if you want to make it available OTA.
Hrm. I spent this afternoon playing around, and I am not very happy
with bb-ant-tools. It doesn't seem to work as well as my hacky call
to rapc.
I guess the trick would be to see if it's possible to recreate what
jadtool is doing...