This discussion is archived
2 Replies Latest reply: Jun 26, 2012 8:39 AM by 816119 RSS

How to generate load commands from cap (ijc)

907439 Newbie
Currently Being Moderated
I don't understand how to generate load command from cap (in my case ijc)-file.
This is the example from GPShell, first command of three:
Command --> 1. 80E80000EFC48203DE01001ADECAFFED01020400011048656C6C6F576F726C64303030305F5002001F001A001F00140031006E00180147004E0036000000F1000A0005003503010004003103000107A0000000620101060210A0000000090003FFFFFFFF8910710002000110A0000000090005FFFFFFFF8913000000030014011048656C6C6F576F726C64303030305F410031060018438003020001070200000041004480020081010108810000070147000A40188C0002188D00058700181100FFAD007B0003037B00039210210303038B0004538901AD00058B0006188B00077A05308F0008181D1E1100FF538C00097A0020
questions:
1. Why the length of each command is equal to EF (239 bytes)? Maybe 239 bytes + Mac len + cla, ins, p1,p2, cmdLen. I mean, will the length always be EF?
2. C48203DE - what is it. In the GP221 i found:
'C4' 1-n Load File Data Block Mandatory. So if it is right, is the 8203DE - Load File Data Block? Because real data from my ijc-file starts after DE - 01001...
3. Is all data from the file used for load? (i notised that the last command does'nt used all the rest bytes)
  • 1. Re: How to generate load commands from cap (ijc)
    907439 Newbie
    Currently Being Moderated
    So, I will help myself
    CAP is zip, but with other filename extension. Inside there are following files:
    Applet.cap
    Class.cap
    ConstantPool.cap
    Debug.cap
    Descriptor.cap
    Directory.cap
    Header.cap
    Import.cap
    Method.cap
    RefLocation.cap
    StaticField.cap

    Order of reading these files for loading by commands 80E8 the following:

    loading Header.cap (51 byte)
    loading Directory.cap (36 byte)
    loading Import.cap (55 byte)
    loading Applet.cap (19 byte)
    loading Class.cap (19 byte)
    loading Method.cap (6779 byte)
    loading StaticField.cap (13 byte)
    loading ConstantPool.cap (397 byte)
    loading RefLocation.cap (663 byte)
    loading Descriptor.cap (1005 byte)
    loading Debug.cap (12115 byte)

    But ijc the file is not cap (zip) and while I didn't understand how to load ijc

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points