The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

import-bot (20211) [Avatar] Offline
#1
[Originally posted by cwsteck]

I've written a Palm app using the MIDP for Palm OS and am writing a conduit
for it using Sun's CDK4.0.3. Since a conduit needs to check the Palm for a
matching creator ID, how do you implement a creator ID for a MIDP app? The
RecordStore Class doesn't have anything for doing so, and I can't find a
Database class, like the one in the KJava implementation. Please Help.

Thanks
Charlie
import-bot (20211) [Avatar] Offline
#2
Re: creator ID's and MIDP for Palm OS
[Originally posted by jwhite]

Charlie,

You will need to use the converter tool that is part of the MIDP for Palm OS
tool to create your PRC file (don't use the wireless tool kit). Information
on this tool is provided at Sun's web site if you look on the MIDP for Palm OS
page, but I have included some of the text from that site below to give you an
idea. Hope this helps.

Jim White



The MIDP for Palm OS comes with a converter tool to convert a MIDlet to an
executable Palm application, with the extension PRC.

Command Line Conversion

The PRC GUI-based converter tool is easy to use. But this comes at the expense
of functionality. For example, what if you wish to associate a new icon with
your application rather than have the default icon? The command line converter
tool offers you more flexibility and options in how you convert your MIDlets
into PRC files?

The MIDP for Palm OS distribution comes with a command line tool for
converting JAR to PRC files. The tool is the MakeMIDPApp application, which is
part of the Converter.jar file. To use it, use the command:

c:midp4palm1.0converter> java -cp Converter.jar
com.sun.midp.palm.database.MakeMIDPApp [options] JARfile

where options can be any of those shown in Table 1:

Option Description
-v verbose output
-v -v More information, including creator ID
-verbose same as -v
-icon <file> File containing a large icon (32x32), in bmp, pbm, or bin Palm
resource format, for the list view of the application
-smallicon <file> File containing a small icon (15x9), in bmp, pbm, or bin
Palm resource format, for the Palm OS device's icon view
-name <name> Short name of the application, for the Palm OS device's icon views
-longname <name> Long name for application, for the Palm OS device's list views
-creator <crid> Creator ID for the application
-type <type> Type file for application (default is appl)
-outfile <file> Name of PRC file to create
-o <outfile> Same as -outfile
-version <string> Change version
-help Print help information
-jad <JADfile> Specify a JAD file (MIDlet suite packaging)


This command line tool can be used to produce PRC files from a single MIDlet
or a MIDlet suite. For example, the following command can be used to convert a
JAR file (containing one MIDlet or a MIDlet suite) to a PRC file:

c:midp4palm1.0converter> java -cp Converter.jar
com.sun.midp.palm.database.MakeMIDPApp -type Data gui.jar

This command will produce a PRC file called gui.prc from the JAR file gui.jar.

Note that the type of application being converted can be either appl or Data
(case sensitive). If you do not provide the -type option, then MakeMIDPApp
uses the default type which is appl. It is important to note, however, that if
you do not provide a creator ID with the -creator option, then you must set
the type to Data. The creator ID specifies the unique, four-character
identifier for a Palm application. Every Palm application must have a creator
ID, and if you do not provide one then MakeMIDPApp will automatically generate
a creator ID for your application. To find out what it is, use the -v -v
option.



> I've written a Palm app using the MIDP for Palm OS and am writing a conduit
> for it using Sun's CDK4.0.3. Since a conduit needs to check the Palm for a
> matching creator ID, how do you implement a creator ID for a MIDP app? The
> RecordStore Class doesn't have anything for doing so, and I can't find a
> Database class, like the one in the KJava implementation. Please Help.
>
> Thanks
> Charlie
import-bot (20211) [Avatar] Offline
#3
Re: creator ID's and MIDP for Palm OS
[Originally posted by cwsteck]

Thank you so much, Jim. Also want to add that your book is the best I've seen
and was a tremendous help in developing the application. I'd love to see you
follow up with a book on writing a Java conduit.

Thanks again
Charlie
import-bot (20211) [Avatar] Offline
#4
Signing a creator ID's and MIDP for Palm OS
[Originally posted by oliver]

Hi, Jim,
I tried to sign a creator ID to my application but failed. I used the -v -v
option to check the converted file. I got no signed creator ID presenting. See
below the output:

G:palmmidp4palm1.0Converter>java -cp Converter.jar com.sun.midp.palm.database
.MakeMIDPApp -v -v -creator MyId HelloMIDlet.jar
Clas 39449: HelloMIDlet
Rsrc 46264: META-INF/MANIFEST.MF
Generating output file "HelloMIDlet.prc".

G:palmmidp4palm1.0Converter>java -cp Converter.jar com.sun.midp.palm.database
.MakeMIDPApp -v -v -type Data HelloMIDlet.jar
Creator id = mJav
Clas 39449: HelloMIDlet
Rsrc 46264: META-INF/MANIFEST.MF
Generating output file "HelloMIDlet.prc".

I have no idea what is going on for that. Could you give me any hint?

Thank for your help!

Oliver

> Charlie,
>
> You will need to use the converter tool that is part of the MIDP for Palm OS
> tool to create your PRC file (don't use the wireless tool kit). Information
> on this tool is provided at Sun's web site if you look on the MIDP for Palm OS
> page, but I have included some of the text from that site below to give you an
> idea. Hope this helps.
>
> Jim White
>
>
>
> The MIDP for Palm OS comes with a converter tool to convert a MIDlet to an
> executable Palm application, with the extension PRC.
>
> Command Line Conversion
>
> The PRC GUI-based converter tool is easy to use. But this comes at the expense
> of functionality. For example, what if you wish to associate a new icon with
> your application rather than have the default icon? The command line converter
> tool offers you more flexibility and options in how you convert your MIDlets
> into PRC files?
>
> The MIDP for Palm OS distribution comes with a command line tool for
> converting JAR to PRC files. The tool is the MakeMIDPApp application, which is
> part of the Converter.jar file. To use it, use the command:
>
> c:midp4palm1.0converter> java -cp Converter.jar
> com.sun.midp.palm.database.MakeMIDPApp [options] JARfile
>
> where options can be any of those shown in Table 1:
>
> Option Description
> -v verbose output
> -v -v More information, including creator ID
> -verbose same as -v
> -icon <file> File containing a large icon (32x32), in bmp, pbm, or bin Palm
> resource format, for the list view of the application
> -smallicon <file> File containing a small icon (15x9), in bmp, pbm, or bin
> Palm resource format, for the Palm OS device's icon view
> -name <name> Short name of the application, for the Palm OS device's icon
views
> -longname <name> Long name for application, for the Palm OS device's list
views
> -creator <crid> Creator ID for the application
> -type <type> Type file for application (default is appl)
> -outfile <file> Name of PRC file to create
> -o <outfile> Same as -outfile
> -version <string> Change version
> -help Print help information
> -jad <JADfile> Specify a JAD file (MIDlet suite packaging)
>
>
> This command line tool can be used to produce PRC files from a single MIDlet
> or a MIDlet suite. For example, the following command can be used to convert a
> JAR file (containing one MIDlet or a MIDlet suite) to a PRC file:
>
> c:midp4palm1.0converter> java -cp Converter.jar
> com.sun.midp.palm.database.MakeMIDPApp -type Data gui.jar
>
> This command will produce a PRC file called gui.prc from the JAR file
gui.jar.
>
> Note that the type of application being converted can be either appl or Data
> (case sensitive). If you do not provide the -type option, then MakeMIDPApp
> uses the default type which is appl. It is important to note, however, that if
> you do not provide a creator ID with the -creator option, then you must set
> the type to Data. The creator ID specifies the unique, four-character
> identifier for a Palm application. Every Palm application must have a creator
> ID, and if you do not provide one then MakeMIDPApp will automatically generate
> a creator ID for your application. To find out what it is, use the -v -v
> option.
>
>
>
> > I've written a Palm app using the MIDP for Palm OS and am writing a conduit
> > for it using Sun's CDK4.0.3. Since a conduit needs to check the Palm for a
> > matching creator ID, how do you implement a creator ID for a MIDP app? The
> > RecordStore Class doesn't have anything for doing so, and I can't find a
> > Database class, like the one in the KJava implementation. Please Help.
> >
> > Thanks
> > Charlie
import-bot (20211) [Avatar] Offline
#5
Signing a creator ID's and MIDP for Palm OS
[Originally posted by jwhite]

Oliver,

Hmmm... I don't see anything that looks like a problem. From Sun's own web
site at http://wireless.java.sun.com/midp/articles/palm/ it looks like you are
following the command line options fine. I tried out a prc with your options
and things appear to be ok. You can even see by your second call that it
assigned the creator id of mJava. Can you give me a little more on how you
are getting the "no signed" error?

thanks
jim

> Hi, Jim,
> I tried to sign a creator ID to my application but failed. I used the -v -v
> option to check the converted file. I got no signed creator ID presenting. See
> below the output:
>
> G:palmmidp4palm1.0Converter>java -cp Converter.jar com.sun.midp.palm.database
> .MakeMIDPApp -v -v -creator MyId HelloMIDlet.jar
> Clas 39449: HelloMIDlet
> Rsrc 46264: META-INF/MANIFEST.MF
> Generating output file "HelloMIDlet.prc".
>
> G:palmmidp4palm1.0Converter>java -cp Converter.jar com.sun.midp.palm.database
> .MakeMIDPApp -v -v -type Data HelloMIDlet.jar
> Creator id = mJav
> Clas 39449: HelloMIDlet
> Rsrc 46264: META-INF/MANIFEST.MF
> Generating output file "HelloMIDlet.prc".
>
> I have no idea what is going on for that. Could you give me any hint?
>
> Thank for your help!
>
> Oliver
>
> > Charlie,
> >
> > You will need to use the converter tool that is part of the MIDP for Palm OS
> > tool to create your PRC file (don't use the wireless tool kit). Information
> > on this tool is provided at Sun's web site if you look on the MIDP for
Palm OS
> > page, but I have included some of the text from that site below to give
you an
> > idea. Hope this helps.
> >
> > Jim White
> >
> >
> >
> > The MIDP for Palm OS comes with a converter tool to convert a MIDlet to an
> > executable Palm application, with the extension PRC.
> >
> > Command Line Conversion
> >
> > The PRC GUI-based converter tool is easy to use. But this comes at the
expense
> > of functionality. For example, what if you wish to associate a new icon with
> > your application rather than have the default icon? The command line
converter
> > tool offers you more flexibility and options in how you convert your MIDlets
> > into PRC files?
> >
> > The MIDP for Palm OS distribution comes with a command line tool for
> > converting JAR to PRC files. The tool is the MakeMIDPApp application,
which is
> > part of the Converter.jar file. To use it, use the command:
> >
> > c:midp4palm1.0converter> java -cp Converter.jar
> > com.sun.midp.palm.database.MakeMIDPApp [options] JARfile
> >
> > where options can be any of those shown in Table 1:
> >
> > Option Description
> > -v verbose output
> > -v -v More information, including creator ID
> > -verbose same as -v
> > -icon <file> File containing a large icon (32x32), in bmp, pbm, or bin Palm
> > resource format, for the list view of the application
> > -smallicon <file> File containing a small icon (15x9), in bmp, pbm, or bin
> > Palm resource format, for the Palm OS device's icon view
> > -name <name> Short name of the application, for the Palm OS device's icon
> views
> > -longname <name> Long name for application, for the Palm OS device's list
> views
> > -creator <crid> Creator ID for the application
> > -type <type> Type file for application (default is appl)
> > -outfile <file> Name of PRC file to create
> > -o <outfile> Same as -outfile
> > -version <string> Change version
> > -help Print help information
> > -jad <JADfile> Specify a JAD file (MIDlet suite packaging)
> >
> >
> > This command line tool can be used to produce PRC files from a single MIDlet
> > or a MIDlet suite. For example, the following command can be used to
convert a
> > JAR file (containing one MIDlet or a MIDlet suite) to a PRC file:
> >
> > c:midp4palm1.0converter> java -cp Converter.jar
> > com.sun.midp.palm.database.MakeMIDPApp -type Data gui.jar
> >
> > This command will produce a PRC file called gui.prc from the JAR file
> gui.jar.
> >
> > Note that the type of application being converted can be either appl or Data
> > (case sensitive). If you do not provide the -type option, then MakeMIDPApp
> > uses the default type which is appl. It is important to note, however,
that if
> > you do not provide a creator ID with the -creator option, then you must set
> > the type to Data. The creator ID specifies the unique, four-character
> > identifier for a Palm application. Every Palm application must have a
creator
> > ID, and if you do not provide one then MakeMIDPApp will automatically
generate
> > a creator ID for your application. To find out what it is, use the -v -v
> > option.
> >
> >
> >
> > > I've written a Palm app using the MIDP for Palm OS and am writing a
conduit
> > > for it using Sun's CDK4.0.3. Since a conduit needs to check the Palm
for a
> > > matching creator ID, how do you implement a creator ID for a MIDP app?
The
> > > RecordStore Class doesn't have anything for doing so, and I can't find a
> > > Database class, like the one in the KJava implementation. Please Help.
> > >
> > > Thanks
> > > Charlie
import-bot (20211) [Avatar] Offline
#6
Signing a creator ID's and MIDP for Palm OS
[Originally posted by oliver]

Hi, Jim,
Actually I did not get a message saying "No sighed creadorID" in the output on
screen. You can see from my output, after I first run the command line option
code, there was no creatorID showing on the detail list of "-v -v" option
output. If you thought there was nothing wrong there, the assigned ID "MyId"
would be appeared in the output. The second call resulted in a creatorID
"mJav"
in the output because but that was assigned by the system automatically, not
mine.
Was there any setting I have done wrong?

Here is my environment:
OS: Win 2000.
J2sdk: 1.4( I alos tried 1.3.)
midp1.0.3fcs
midp4palm1.0

I added the following into the PATH veriable:
c:j2sdk1.4.1_01in;c:j2memidpin

I got HelloMIDlet.java ,HELLOMIDlet.mf, and MelloMIDlet.jad from the sample
codes come with midp1.0.3fcs:
G:palmmidp1.0.3fcssrcexample

I had a .bat file to compile and preverify the MIDlet. My working diredory is
G:palm est. Here is the .bat file:
set path=c:j2sdk1.4.1_01in;c:j2memidpin;%path%
set MIDP_HOME=C:j2memidp
mkdir -p classes
javac -d tmpclasses -bootclasspath %MIDP_HOME%classes -classpath tmpclasses;.
HelloMIDlet.java
c:j2memidpinpreverify -classpath %MIDP_HOME%classes;tmpclasses -d
classes tmpclasses
jar cmf HelloMIDlet.mf HelloMIDlet.jar -C classes .
midp -classpath %MIDP_HOME%classes.;classes HelloMIDlet


After I ran .bat file above, I tried to converter the jar file into .prc file.
So I copy HelloMIDlet.jar into midp4palm converter directory.
Then I executed the following commands.
************************************************************************
G:palmmidp4palm1.0Converter>java -classpath Converter.jar;. com.sun.midp.palm
.database.MakeMIDPApp -creator MyId -v -v HelloMIDlet.jar
Clas 39449: HelloMIDlet
Rsrc 46264: META-INF/MANIFEST.MF
Generating output file "HelloMIDlet.prc".
*********************************************************************

Since there is no creator ID in the output, I ran another command:

******************************************************************
G:palmmidp4palm1.0Converter>java -classpath Converter.jar;. com.sun.midp.palm
.database.MakeMIDPApp -type Data -v -v HelloMIDlet.jar
Creator id = mJav
Clas 39449: HelloMIDlet
Rsrc 46264: META-INF/MANIFEST.MF
Generating output file "HelloMIDlet.prc".
********************************************************************

This time a creatorID "mJav" was showing on the list, but I had nothing to do
with that. Every MIDlet without supplying an user desired ID will have this
same ID.

These are almost everything I had done.

Thank you very much for your patient and help.

Oliver


>Oliver,

>Hmmm... I don't see anything that looks like a problem. From Sun's own web
>site at http://wireless.java.sun.com/midp/articles/palm/ it looks like you are
>following the command line options fine. I tried out a prc with your options
>and things appear to be ok. You can even see by your second call that it
>assigned the creator id of mJava. Can you give me a little more on how you
>are getting the "no signed" error?

>thanks
>jim

> Hi, Jim,
> I tried to sign a creator ID to my application but failed. I used the -v -v
> option to check the converted file. I got no signed creator ID presenting. See
> below the output:
>
> G:palmmidp4palm1.0Converter>java -cp Converter.jar com.sun.midp.palm.database
> .MakeMIDPApp -v -v -creator MyId HelloMIDlet.jar
> Clas 39449: HelloMIDlet
> Rsrc 46264: META-INF/MANIFEST.MF
> Generating output file "HelloMIDlet.prc".
>
> G:palmmidp4palm1.0Converter>java -cp Converter.jar com.sun.midp.palm.database
> .MakeMIDPApp -v -v -type Data HelloMIDlet.jar
> Creator id = mJav
> Clas 39449: HelloMIDlet
> Rsrc 46264: META-INF/MANIFEST.MF
> Generating output file "HelloMIDlet.prc".
>
> I have no idea what is going on for that. Could you give me any hint?
>
> Thank for your help!
>
> Oliver
import-bot (20211) [Avatar] Offline
#7
Opps, the same error
[Originally posted by oliver]

Jim,
It seems this forum can not display the backword slash. I got the same error
as before. I will try later.

Sorry,

Oliver
import-bot (20211) [Avatar] Offline
#8
This is the right post
[Originally posted by oliver]

Now I figured out how to get "" displayed.

> HI, Jim,
> I don't know what is going on for that, the previous post had some
> strange code in it. So I corrected them and post it again.
> Sorry for any inconvenience.
>
> Oliver
--------------------------------------------------------------------------------
> Hi, Jim,
> Actually I did not get a message saying "No sighed creadorID" in the output
on
> screen. You can see from my output, after I first run the command line option
> code, there was no creatorID showing on the detail list of "-v -v" option
> output. If you thought there was nothing wrong there, the assigned ID "MyId"
> would be appeared in the output. The second call resulted in a creatorID
> "mJav" in the output because but that was assigned by the system
> automatically,not mine.
> Was there any setting I have done wrong?
>
> Here is my environment:
> OS: Win 2000.
> J2sdk: 1.4( I alos tried 1.3.)
> midp1.0.3fcs
> midp4palm1.0
>
> I added the following into the PATH veriable:
> c:j2sdk1.4.1_01in;c:j2memidpin
>
> I got HelloMIDlet.java ,HELLOMIDlet.mf, and MelloMIDlet.jad from the sample
> codes come with midp1.0.3fcs:
> G:palmmidp1.0.3fcssrcexample
>
> I had a .bat file to compile and preverify the MIDlet. My working diredory is
> G:palm est. Here is the .bat file:
> set path=c:j2sdk1.4.1_01in;c:j2memidpin;%path%
> set MIDP_HOME=C:j2memidp
> mkdir -p classes
> javac -d tmpclasses -bootclasspath %MIDP_HOME%classes -classpath
tmpclasses;.
> HelloMIDlet.java
> %MIDP_HOME%in preverify -classpath %MIDP_HOME%classes;tmpclasses -d
> classes tmpclasses
> jar cmf HelloMIDlet.mf HelloMIDlet.jar -C classes .
> midp -classpath %MIDP_HOME%classes.;classes HelloMIDlet
>
>
> After I ran .bat file above, I tried to converter the jar file into .prc
file.
> So I copy HelloMIDlet.jar into midp4palm converter directory.
> Then I executed the following commands.
> ************************************************************************
> G:palmmidp4palm1.0Converter>java -classpath Converter.jar;.
> com.sun.midp.palm
> .database.MakeMIDPApp -creator MyId -v -v HelloMIDlet.jar
> Clas 39449: HelloMIDlet
> Rsrc 46264: META-INF/MANIFEST.MF
> Generating output file "HelloMIDlet.prc".
> *********************************************************************
>
> Since there is no creator ID in the output, I ran another command:
>
> ******************************************************************
> G:palmmidp4palm1.0Converter>java -classpath Converter.jar;.
> com.sun.midp.palm
> .database.MakeMIDPApp -type Data -v -v HelloMIDlet.jar
> Creator id = mJav
> Clas 39449: HelloMIDlet
> Rsrc 46264: META-INF/MANIFEST.MF
> Generating output file "HelloMIDlet.prc".
> ********************************************************************
>
> This time a creatorID "mJav" was showing on the list, but I had nothing to do
> with that. Every MIDlet without supplying an user desired ID will have this
> same ID.
>
> These are almost everything I had done.
>
> Thank you very much for your patient and help.
>
> Oliver
import-bot (20211) [Avatar] Offline
#9
Please skip the previous post
[Originally posted by oliver]

HI, Jim,
PlieasI don't know what is going on for that, the previous post had some
strange code in it. So I corrected them and post it again.
Sorry for any inconvenience.

Oliver
--------------------------------------------------------------------------------
Hi, Jim,
Actually I did not get a message saying "No sighed creadorID" in the output on
screen. You can see from my output, after I first run the command line option
code, there was no creatorID showing on the detail list of "-v -v" option
output. If you thought there was nothing wrong there, the assigned ID "MyId"
would be appeared in the output. The second call resulted in a creatorID
"mJav" in the output because but that was assigned by the system
automatically,not mine.
Was there any setting I have done wrong?

Here is my environment:
OS: Win 2000.
J2sdk: 1.4( I alos tried 1.3.)
midp1.0.3fcs
midp4palm1.0

I added the following into the PATH veriable:
c:j2sdk1.4.1_01in;c:j2memidpin

I got HelloMIDlet.java ,HELLOMIDlet.mf, and MelloMIDlet.jad from the sample
codes come with midp1.0.3fcs:
G:palmmidp1.0.3fcssrcexample

I had a .bat file to compile and preverify the MIDlet. My working diredory is
G:palm est. Here is the .bat file:
set path=c:j2sdk1.4.1_01in;c:j2memidpin;%path%
set MIDP_HOME=C:j2memidp
mkdir -p classes
javac -d tmpclasses -bootclasspath %MIDP_HOME%classes -classpath tmpclasses;.
HelloMIDlet.java
%MIDP_HOME%in preverify -classpath %MIDP_HOME%classes;tmpclasses -d
classes tmpclasses
jar cmf HelloMIDlet.mf HelloMIDlet.jar -C classes .
midp -classpath %MIDP_HOME%classes.;classes HelloMIDlet


After I ran .bat file above, I tried to converter the jar file into .prc file.
So I copy HelloMIDlet.jar into midp4palm converter directory.
Then I executed the following commands.
************************************************************************
G:palmmidp4palm1.0Converter>java -classpath Converter.jar;.
com.sun.midp.palm
.database.MakeMIDPApp -creator MyId -v -v HelloMIDlet.jar
Clas 39449: HelloMIDlet
Rsrc 46264: META-INF/MANIFEST.MF
Generating output file "HelloMIDlet.prc".
*********************************************************************

Since there is no creator ID in the output, I ran another command:

******************************************************************
G:palmmidp4palm1.0Converter>java -classpath Converter.jar;.
com.sun.midp.palm
.database.MakeMIDPApp -type Data -v -v HelloMIDlet.jar
Creator id = mJav
Clas 39449: HelloMIDlet
Rsrc 46264: META-INF/MANIFEST.MF
Generating output file "HelloMIDlet.prc".
********************************************************************

This time a creatorID "mJav" was showing on the list, but I had nothing to do
with that. Every MIDlet without supplying an user desired ID will have this
same ID.

These are almost everything I had done.

Thank you very much for your patient and help.

Oliver