View Single Post
Old 08-05-2007, 01:45 PM   #1
helch
mostly harmless
helch doesn't litterhelch doesn't litter
 
Posts: 8
Karma: 128
Join Date: Jul 2007
Location: Switzerland
Device: iRex iLiad
script for starting java apps inside contentLister

I've made a python script for starting my java applications out of a comfortable package with the contentLister.

You will need to install python (https://www.mobileread.com/forums/showthread.php?t=12636) first. I need it for proper parsing of the xml manifest file. If someone makes a script doing this with bash or C please let me know.
  • Download here: http://projects.mobileread.com/iliad...tartjar.tar.gz
  • Unpack it somwhere on your iliad, say to /usr/local/startjar/
  • Add this to your er_settings.txt (be very careful..):
    Code:
    [USER_APPLICATIONS]
    uaIDList=SHELL;BROWSER;IPDF;APABIMOBI;IMAGEVIEWER;SETUP;PROFILES;EBA;MOBIPOCKET;ARINC;SLIDESHOW;JAR
    [JAR]
    category=viewer
    arguments=<MANIFEST>
    exec=/usr/local/startjar/startjar.py
    xResourceName=intent
    channel=15
    extensions=jar
    
    ...
    
    [EXTENSION_INFO]
    ...
    jar=/usr/local/startjar/java.png
  • Now to create a beautiful java package just create an empty folder, put there all your jar files and an icon if you like and create a manifest.xml like this:
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <package>
            <metadata>
                    <dc-metadata>
                            <Title>Title of your Application</Title>
                            <Description>Description of your Applikation</Description>
                            <Date>2007-01-01T00:00:00</Date>
                            <Format/>
                            <Identifier/>
                            <Language/>
                            <Type/>
                    </dc-metadata>
                    <y-metadata>
                            <startpage>just_one_of_your_jarfiles_to_keep_contentLister_happy.jar</startpage>
                            <image>your_own_icon_if_any.png</image>
                            <version>000</version>
                            <ItemSize>819200</ItemSize></y-metadata>
                    <jar>
                            <jarfile>your_jar_file.jar</jarfile>
                            <jarfile>another_jar_file.jar</jarfile>
                            <jarfile>/home/intent/irex.jar</jarfile>
                            <vm-argument>-v</vm-argument>
                            <vm-argument>-Dfoo.bar=foobar</vm-argument>
                            <startclass>my.package.name.MyApp</startclass>
                            <app-argument>first argument for your application</app-argument>
                            <app-argument>second argument for your application</app-argument>
                    </jar>
            </metadata>
    </package>

Hope you like it.
Feel free to improve!
helch is offline   Reply With Quote