Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > iRex > iRex Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 05-07-2007, 04:18 PM   #1
scotty1024
Banned
scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.
 
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
THe new development toy from iRex: java

The new Mobipocket Java engine is actually an embedded real time operating system: Intent from the Tao Group.

http://tao-group.com/

First thing they've done in awhile that I can actually say: way to go.
scotty1024 is offline   Reply With Quote
Old 05-07-2007, 04:30 PM   #2
narve
iLiad fan
narve can teach chickens to fly.narve can teach chickens to fly.narve can teach chickens to fly.narve can teach chickens to fly.narve can teach chickens to fly.narve can teach chickens to fly.narve can teach chickens to fly.narve can teach chickens to fly.narve can teach chickens to fly.narve can teach chickens to fly.narve can teach chickens to fly.
 
Posts: 210
Karma: 3864
Join Date: Oct 2006
Device: iRex iLiad
Quote:
Originally Posted by scotty1024
The new Mobipocket Java engine is actually an embedded real time operating system: Intent from the Tao Group.

http://tao-group.com/

First thing they've done in awhile that I can actually say: way to go.
Time to set up a java development environment...
narve is offline   Reply With Quote
Old 05-07-2007, 04:40 PM   #3
Adam B.
Addicted to Porting
Adam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the rough
 
Adam B.'s Avatar
 
Posts: 1,695
Karma: 7194
Join Date: Oct 2006
Location: Indianapolis, IN
Device: iRex iLiad, Nokia 770, Samsung i760
A little more info can be found here: http://www.mobileread.com/forums/showthread.php?t=10698
Adam B. is offline   Reply With Quote
Old 05-07-2007, 10:43 PM   #4
scotty1024
Banned
scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.
 
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
One thing I've worked out: it doesn't want to load any class file with a version newer than 47 (JDK 1.3). Be sure to set your -target -source correctly when compiling the classes for your JAR's and inspect your 3rd party JAR's to make sure their class files are compiled to the correct version level as well.

Curiously iRex is sticking to JDK 1.2...

Code:
DisplayUpdate.class:     compiled Java class data, version 46.0
ErBusy.class:            compiled Java class data, version 46.0
ErChannelClient.class:   compiled Java class data, version 46.0
ErClientBase.class:      compiled Java class data, version 46.0
ErDisplayClient.class:   compiled Java class data, version 46.0
ErIpcChannel.class:      compiled Java class data, version 46.0
ErIpcClient.class:       compiled Java class data, version 46.0
ErIpcCmd.class:          compiled Java class data, version 46.0
ErIpcServer.class:       compiled Java class data, version 46.0
ErPageBar.class:         compiled Java class data, version 46.0
ErToolBar.class:         compiled Java class data, version 46.0
HelloWorld.class:        compiled Java class data, version 46.0
HelloWorldAWT.class:     compiled Java class data, version 46.0
IpcServerCallBack.class: compiled Java class data, version 46.0
Log.class:               compiled Java class data, version 46.0
SDKTest.class:           compiled Java class data, version 46.0
SimpleTest.class:        compiled Java class data, version 46.0
UpdateRequest.class:     compiled Java class data, version 46.0
ViewerSignal.class:      compiled Java class data, version 46.0
The JVM also has a bug in its handling of unpackaged classes. When creating a test case make sure you package it and any JAR's you use need to have all their classes packaged.

The JVM benchmark ACE.jar for example doesn't work because it is entirely unpackaged.

Last edited by scotty1024; 05-07-2007 at 11:10 PM. Reason: Fixed JDK version
scotty1024 is offline   Reply With Quote
Old 05-08-2007, 04:10 PM   #5
scotty1024
Banned
scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.
 
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
Code:
package com.irex.sdk;

import com.mobipocket.common.library.reader.Security;
import java.awt.GraphicsEnvironment;
import java.io.PrintStream;

public class SimpleTest
{

    public void test()
    {
        System.out.println("====test null==");
        String s = null;
        System.out.println("len=" + s.length());
    }

    public void printFontList()
    {
        System.out.println("---------font family list---------");
        String as[] = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();
        for(int i = 0; i < as.length; i++)
            System.out.println("[" + as[i] + "]");

        System.out.println("---------done---------");
    }

    public SimpleTest()
    {
        String s = Security.generatePID("00-16-7c-00-09-cf", 8);
        System.out.println("sDevicePID=[" + s + "]");
        String s1 = Security.getChecksumedPID(s);
        System.out.println("sEndUserPID=[" + s1 + "]");
    }

    public static void main(String args[])
    {
        SimpleTest simpletest = new SimpleTest();
        simpletest.printFontList();
    }
}
scotty1024 is offline   Reply With Quote
Old 05-08-2007, 04:11 PM   #6
scotty1024
Banned
scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.
 
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
Code:
package com.irex.sdk;

import java.awt.Frame;
import java.io.PrintStream;
import java.util.Date;

// Referenced classes of package com.irex.sdk:
//            DisplayUpdate

public class HelloWorldAWT
{

    public HelloWorldAWT()
    {
    }

    private void createAndShowGUI()
    {
        Frame frame = new Frame("HelloWorldSwing");
        frame.pack();
        frame.setSize(768, 1024);
        frame.setVisible(true);
    }

    public static void main(String args[])
    {
        System.out.println("start time:" + (new Date()).getTime());
        HelloWorldAWT helloworldawt = new HelloWorldAWT();
        helloworldawt.createAndShowGUI();
        DisplayUpdate.dispMainWinFullQ();
        System.out.println("finished,time is:" + (new Date()).getTime());
    }
}
scotty1024 is offline   Reply With Quote
Old 05-08-2007, 04:12 PM   #7
scotty1024
Banned
scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.
 
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
Code:
package com.irex.sdk;

import java.io.FileInputStream;
import java.io.PrintStream;

public class HelloWorld
{

    public HelloWorld()
    {
    }

    public static void main(String args[])
    {
        try
        {
            byte abyte0[] = new byte[12];
            char c = '\u0106';
            FileInputStream fileinputstream = new FileInputStream("ROOTDIR/proc/sysset/raw");
            byte abyte1[] = new byte[c + 6];
            int i = fileinputstream.read(abyte1);
            System.out.println("read:" + i + " bytes");
            for(int j = 0; j < 6; j++)
            {
                byte byte0 = abyte1[c + j];
                int k = byte0 >>> 4 & 0xf;
                int l = byte0 & 0xf;
                char c1 = Character.forDigit(k, 16);
                char c2 = Character.forDigit(l, 16);
                System.out.println(j + "=" + abyte1[c + j] + ",(" + k + "," + l + "),char=[" + c1 + "," + c2 + "]");
            }

        }
        catch(Exception exception)
        {
            exception.printStackTrace();
        }
    }
}
scotty1024 is offline   Reply With Quote
Old 05-08-2007, 04:13 PM   #8
scotty1024
Banned
scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.
 
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
Code:
package com.irex.sdk;

import java.io.PrintStream;

// Referenced classes of package com.irex.sdk:
//            ErIpcServer, DisplayUpdate, Log, ErToolBar, 
//            ErPageBar, ErBusy, ErDisplayClient

public class SDKTest
{

    public SDKTest()
    {
    }

    public static void main(String args[])
    {
        System.out.println("start testing ipcserver");
        ErIpcServer eripcserver = ErIpcServer.getInstanceByChannelId(10, null);
        if(eripcserver == null)
            return;
        System.out.println("will start ipcserver");
        eripcserver.startServer();
        System.out.println("sleep 25 seconds");
        try
        {
            Thread.currentThread();
            Thread.sleep(10000L);
        }
        catch(InterruptedException interruptedexception)
        {
            interruptedexception.printStackTrace();
        }
        System.out.println("will stop ipcserver");
        eripcserver.shutdownServer();
        System.out.println("finish testing ipcserver");
        System.out.println("starting test toolbar");
        DisplayUpdate displayupdate = DisplayUpdate.getInstance();
        if(displayupdate == null)
            return;
        System.out.println("sleep 10 seconds for prepare");
        try
        {
            Thread.currentThread();
            Thread.sleep(15000L);
        }
        catch(InterruptedException interruptedexception1)
        {
            interruptedexception1.printStackTrace();
        }
        Log.logString(" firstly, we test the Log utility");
        ErToolBar ertoolbar = ErToolBar.getInstance();
        if(ertoolbar == null)
            return;
        byte byte0 = 103;
        ertoolbar.tbDisableUpdate(byte0);
        ertoolbar.tbSelectIconSet(byte0);
        ertoolbar.tbClearIconSet(byte0);
        ertoolbar.appendPlatformIcon(byte0, 1, 6);
        ertoolbar.tbSetStatePlatformIcon(byte0, 1, 1);
        ertoolbar.appendPlatformIcon(byte0, 2, 6);
        ertoolbar.appendPlatformIcon(byte0, 3, 6);
        ertoolbar.appendPlatformIcon(byte0, 4, 6);
        ertoolbar.tbEnableUpdate(byte0);
        DisplayUpdate _tmp = displayupdate;
        displayupdate.request_screen_refresh(4, 2);
        try
        {
            Thread.currentThread();
            Thread.sleep(10000L);
        }
        catch(InterruptedException interruptedexception2)
        {
            interruptedexception2.printStackTrace();
        }
        ertoolbar.tbRemovePlatformIcon(byte0, 1);
        ertoolbar.tbRemovePlatformIcon(byte0, 2);
        ertoolbar.tbRemovePlatformIcon(byte0, 3);
        System.out.println("toolbar testing finished");
        ertoolbar.close();
        System.out.println("starting test pagebar");
        ErPageBar erpagebar = ErPageBar.getInstance();
        if(erpagebar == null)
            return;
        erpagebar.pbReset(byte0);
        erpagebar.pbSetPageCount(byte0, 15);
        erpagebar.pbSetCurrentPage(byte0, 11);
        erpagebar.pbRedraw(byte0);
        DisplayUpdate _tmp1 = displayupdate;
        displayupdate.request_screen_refresh(4, 0);
        try
        {
            Thread.currentThread();
            Thread.sleep(10000L);
        }
        catch(InterruptedException interruptedexception3)
        {
            interruptedexception3.printStackTrace();
        }
        System.out.println("pagebar testing finished");
        erpagebar.close();
        System.out.println("starting test busy");
        ErBusy erbusy = ErBusy.getInstance();
        if(erbusy == null)
            return;
        erbusy.blink();
        System.out.println("sleep 10 seconds");
        try
        {
            Thread.currentThread();
            Thread.sleep(10000L);
        }
        catch(InterruptedException interruptedexception4)
        {
            interruptedexception4.printStackTrace();
        }
        erbusy.off();
        System.out.println("busy off, testing finished");
        erbusy.close();
        System.out.println("start testing display manager client");
        ErDisplayClient erdisplayclient = ErDisplayClient.getInstance();
        if(erdisplayclient == null)
            return;
        System.out.println("display all");
        ErDisplayClient _tmp2 = erdisplayclient;
        erdisplayclient.display(1, 0);
        System.out.println("sleep 10 seconds");
        try
        {
            Thread.currentThread();
            Thread.sleep(10000L);
        }
        catch(InterruptedException interruptedexception5)
        {
            interruptedexception5.printStackTrace();
        }
        System.out.println("start erase to white");
        erdisplayclient.eraseToWhite(2);
        System.out.println("all testing is finishing!");
    }
}
scotty1024 is offline   Reply With Quote
Old 05-08-2007, 04:16 PM   #9
scotty1024
Banned
scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.
 
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
I'm preparing JavaDoc for the actual API classes but the above test cases show how to use the API's. I posted them in this form so people can quote them to ask questions and or form answers.
scotty1024 is offline   Reply With Quote
Old 05-08-2007, 06:28 PM   #10
scotty1024
Banned
scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.
 
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
Options the elate jvm groks.

Code:
Usage: app/stdio/jcode [option]... class [argument]...

where options include:
  -classpath <directories>   class search path (';' separated)
  -finalizerthreadpriority   sets the priority of the finalizer thread
  -gcchunking                set the gc chunking flags (0 = no chunking)
  -gccompaction              set the gc compaction flags (0 = no compaction)
  -gcflushtool               make gc force a tool flush
  -gcmaxheapsize <bytes>     set the gc heap size
  -gcthreadpriority          sets the priority of the gc thread
  -gcthreshold <bytes>       set the gc threshold
  -help,-h                   print out this message
  -maxstacksize <bytes>      upper bound for thread stack size
  -minstacksize <bytes>      lower bound for thread stack size
  -noasyncgc                 disable asynchronous garbage collection
  -noclassgc                 disable class garbage collection
  -noillegalaccesschecks     disable illegal access checks
  -noverify                  do not verify any class
  -verbose:class,-v          print a message whenever a class is loaded
  -verbose:gc                print a message when garbage collection occurs
  -verbose:jni               print a message whenever a jni call is made
  -verify                    verify all classes when read in
  -verifyremote              verify classes read in over the network [default]
  -D<name>=<value>           set a system property
Example:

Code:
root@ereader:/home/intent# sys/platform/linux/taoref/er10xx/elate -B sys/platform/linux/taoref/er10xx/target.img -l sys/platform/linux/taoref/er10xx/ "-capp/stdio/jcode -h"                                            
intent (Linux boot loader)
Copyright (c) Tao Systems Ltd 1997-2000

0x564E24 bytes read
Booting image at 0x401ce000-0x405ce400
root@ereader:/home/intent# cat /tmp/ktrace.log
scotty1024 is offline   Reply With Quote
Old 05-08-2007, 06:29 PM   #11
NatCh
Gizmologist
NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.
 
NatCh's Avatar
 
Posts: 11,605
Karma: 926222
Join Date: Jan 2006
Location: Republic of Texas Embassy at Jackson, TN
Device: Nook STGR
So, does this mean you're doing development for the iLiad again, scotty1024?
NatCh is offline   Reply With Quote
Old 05-08-2007, 07:35 PM   #12
scotty1024
Banned
scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.
 
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
The road to my heart is paved in Java.
scotty1024 is offline   Reply With Quote
Old 05-08-2007, 07:41 PM   #13
NatCh
Gizmologist
NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.
 
NatCh's Avatar
 
Posts: 11,605
Karma: 926222
Join Date: Jan 2006
Location: Republic of Texas Embassy at Jackson, TN
Device: Nook STGR
I'm sure that says something profound about your character, scotty1024, but I think I'll just have a good laugh over it and leave the deeper analysis for another day.
NatCh is offline   Reply With Quote
Old 05-08-2007, 07:48 PM   #14
scotty1024
Banned
scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.
 
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
So I've been abusing the DJVU Java Viewer to learn about the new shiny shiny.

No Swing, that really limits what you can grab "off the shelf". But I've got the swing ripped out of the DJVU Viewer now.

But I've still got a missing class and the elate isn't very communicative about this class of error, you have to infer (and confirm by test) that -v shows it loading a linkage error class before issuing the class not found error to know it couldn't load some related class. If it can't find the class it doesn't load the linkage error class then throw the class not found exception. Yeah I'd prefer an explicit message with the class in question but at least it has this clue.

Also, no Applet support. So there is another class of "off the shelf" that won't run at this point.

So what's left? Looks like MIDP 1.0/2.0 apps using J2ME and Desktop apps written with AWT. And of course you'll need source to those since you have to add in the iRex API calls.
scotty1024 is offline   Reply With Quote
Old 05-09-2007, 05:41 AM   #15
tororebelde
No es el toro que piensas
tororebelde began at the beginning.
 
tororebelde's Avatar
 
Posts: 44
Karma: 10
Join Date: Mar 2007
Device: iRex iliad
Smile

Whoa! Fantastic Scotty1024 is back!

Java is one of my favourite programming languajes and I would like to port some develops to iliad, now we have an irex java sdk to iliad.
What i'm trying is to use the tao group image on our VMware development environment, but with no luck.

I add myself to this new iliad way and I will keep you on my advances.
tororebelde is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
iRex DR1000 Development VMWare Image Adam B. iRex 9 08-19-2010 05:23 AM
iRex DR1000 Software Development website vwinstead iRex 23 02-04-2009 01:21 PM
iRex Community Development Help Adam B. iRex 33 02-02-2008 08:12 PM
iRex Open Community Development Adam B. iRex 16 12-05-2007 05:31 PM
iLiad Other Java development options...? thisisfrancis iRex Developer's Corner 5 09-27-2007 10:23 AM


All times are GMT -4. The time now is 03:55 AM.


MobileRead.com is a privately owned, operated and funded community.