08-05-2007, 01:45 PM | #1 |
mostly harmless
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.
Hope you like it. Feel free to improve! |
08-06-2007, 02:41 AM | #2 |
iLiad fan
Posts: 210
Karma: 3864
Join Date: Oct 2006
Device: iRex iLiad
|
well done!
|
Advert | |
|
10-17-2007, 11:00 AM | #3 |
Pac-Man caught my iLiad.
Posts: 807
Karma: 3595
Join Date: Apr 2006
Location: Germany; next to Baltic Sea
Device: Boox Max Lumi, iRex iLiad (RIP)
|
Well, I reactivate this thread again.
Because of the fact that firmware 2.11 hasn't got a er_settings.txt anymore, some preparation need to be changed. We have a new configuration file, which lives here: Code:
/mnt/settings/registry/registry.xml Code:
<applications> ... <application type="JAR"> <appCategory>viewer</appCategory> <execute>=/usr/local/startjar/startjar.py</execute> <argMask>_MANIFEST_</argMask> <xResourceName>intent</xResourceName> <ipcChannel>15</ipcChannel> <supportFormat> <extName>jar</extName> </supportFormat> <appIconPath/> </application> ... </applications> Code:
<extensionInfos> ... <extensionInfo> <associateApp>JAR</associateApp> <associateOrder>1</associateOrder> <extName>jar</extName> <extIcon>/usr/local/startjar/java.png</extIcon> </extensionInfo> ... </extensionInfos> I wanted to start the sample app Anagrams of the JDK with this manifest.xml. Code:
<?xml version="1.0" encoding="utf-8"?> <package> <metadata> <dc-metadata> <Title>Anagram</Title> <Description/> <Date>2007-01-01T00:00:00</Date> </dc-metadata> <y-metadata> <startpage>anagrams.jar</startpage> <image>.cover.png</image> <version>000</version> <ItemSize>32768</ItemSize> </y-metadata> <jar> <jarfile>anagrams.jar</jarfile> <jarfile>/home/intent/irex.jar</jarfile> <vm-argument>-v</vm-argument> <vm-argument>-Dfoo.bar=foobar</vm-argument> <startclass>com.toy.anagrams.ui.Anagrams</startclass> </jar> </metadata> </package> I can't correct my fault because trying to start a java program was my very last action before putting my iLiad in the travelling box for the trip to home. So "startclass" in manifest.xml should be the same as "Main-Class" in META-INF/MANIFEST.MMF of app's jar file? Right? Code:
Manifest-Version: 1.0 Ant-Version: Apache Ant 1.6.5 Created-By: 1.6.0_03-b05 (Sun Microsystems Inc.) Main-Class: com.toy.anagrams.ui.Anagrams Class-Path: X-COMMENT: Main-Class will be added automatically by build |
10-17-2007, 11:42 AM | #4 | |
mostly harmless
Posts: 8
Karma: 128
Join Date: Jul 2007
Location: Switzerland
Device: iRex iLiad
|
Hi yokos
Looks fine. Unfortunately I do not have an Iliad available anymore to test because my internship where I had to work with it is over now. Maybe I'll buy one someday (still waiting for an extreme price drop ). Quote:
And btw: you won't need "<vm-argument>-Dfoo.bar=foobar</vm-argument>", thats just some example argument. Thanks to you too for figuring out how this works in the new registry format. |
|
10-17-2007, 11:51 AM | #5 | |
Pac-Man caught my iLiad.
Posts: 807
Karma: 3595
Join Date: Apr 2006
Location: Germany; next to Baltic Sea
Device: Boox Max Lumi, iRex iLiad (RIP)
|
Quote:
Q: Ok, how did the refreshment of screen work with any "not prepared for iLiad" jar? I have downloaded your startjar/python in August but I never used it until this morning. Now I have to wait again until my iLiad comes back. Last edited by yokos; 10-17-2007 at 11:58 AM. Reason: added: Q |
|
Advert | |
|
10-17-2007, 12:37 PM | #6 | |
mostly harmless
Posts: 8
Karma: 128
Join Date: Jul 2007
Location: Switzerland
Device: iRex iLiad
|
Quote:
In the best case, when you've got the source, you can insert the refresh calls (irex.jar api) at the correct places. Otherwise you can try using the hacked X11 libraries. That would be inserting something like: Code:
os.environ['LD_LIBRARY_PATH']='/path/to/hacked/libX11.so:' + os.environ['LD_LIBRARY_PATH'] |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Custom Java apps/booklets on Kindle? | dumky | Kindle Developer's Corner | 10 | 02-10-2009 03:26 PM |
iLiad Better contentLister | rudysplif | iRex Developer's Corner | 5 | 11-26-2008 11:11 PM |
contentLister not starting :( | thetechnobear | iRex | 2 | 12-02-2007 12:59 PM |
iLiad Replacing the contentlister | tribble | iRex Developer's Corner | 21 | 06-22-2007 03:58 PM |
[Apple]Java Embedding Plugin 0.9.2: Force java to run in browsers other than Safari | Zire | Lounge | 4 | 05-24-2005 09:12 PM |