Topic
  • 5 replies
  • Latest Post - ‏2008-03-14T08:36:34Z by StanleyGambarin
SystemAdmin
SystemAdmin
9394 Posts

Pinned topic Best way to build

‏2008-01-03T13:59:32Z |
Hello everyone,

I build my WM5/WEME 6.1 application using jdk 1.4 and it works very well. I
had an issue the other day though where I wrote some code only to find out
at runtime that I had utilized an unsupported class (can't remember what it
was). Not the end of the world, I went back and made a substitution and the
world was right again.

My question is: is there a way to detect unsupported classes/methods before
runtime, ie at compile time?

Back in the WEME 5.7 days, there was a j9c that was very helpful but it
looks like using the standard jdk is the way to go these days.

Thanks for any help,
Phil
Updated on 2008-03-14T08:36:34Z at 2008-03-14T08:36:34Z by StanleyGambarin
  • SystemAdmin
    SystemAdmin
    9394 Posts

    Re: Best way to build

    ‏2008-01-04T16:38:28Z  
    On 01/03/2008 08:59:32 AM "Phil"wrote:

    I build my WM5/WEME 6.1 application using jdk 1.4 and it works very well.
    I
    had an issue the other day though where I wrote some code only to find
    out
    at runtime that I had utilized an unsupported class (can't remember what
    it
    was). Not the end of the world, I went back and made a substitution and
    the
    world was right again.

    My question is: is there a way to detect unsupported classes/methods
    before
    runtime, ie at compile time?

    I do two things:

    1) I develop on Windows XP and test on the same version (2.3) of J9, as
    I'm using on WM5.

    2) I refer to the following:

    http://java.sun.com/products/cdc/reference/cdc_packages.pdf
  • SystemAdmin
    SystemAdmin
    9394 Posts

    Re: Best way to build

    ‏2008-01-07T15:30:49Z  
    On 01/03/2008 08:59:32 AM "Phil"wrote:

    I build my WM5/WEME 6.1 application using jdk 1.4 and it works very well.
    I
    had an issue the other day though where I wrote some code only to find
    out
    at runtime that I had utilized an unsupported class (can't remember what
    it
    was). Not the end of the world, I went back and made a substitution and
    the
    world was right again.

    My question is: is there a way to detect unsupported classes/methods
    before
    runtime, ie at compile time?

    I do two things:

    1) I develop on Windows XP and test on the same version (2.3) of J9, as
    I'm using on WM5.

    2) I refer to the following:

    http://java.sun.com/products/cdc/reference/cdc_packages.pdf
    So it looks like there is no way to flag those errors at compile time?
    Shame.

    But yes, I have that chart handy all the time. I can't remember what class
    it was but the class in question was missing some methods. So that chart
    didn't help too much. Like I said, it's not the end of the world because the
    issues do get caught at runtime but it would be nicer to get them at compile
    time. Ah well.

    Thanks for the help!

    Phil

    <JRancier@penntraffic.com> wrote in message
    news:fllne3$1i43u$1@news.boulder.ibm.com...
    On 01/03/2008 08:59:32 AM "Phil"wrote:

    I build my WM5/WEME 6.1 application using jdk 1.4 and it works very well.
    I
    had an issue the other day though where I wrote some code only to find
    out
    at runtime that I had utilized an unsupported class (can't remember what
    it
    was). Not the end of the world, I went back and made a substitution and
    the
    world was right again.

    My question is: is there a way to detect unsupported classes/methods
    before
    runtime, ie at compile time?

    I do two things:

    1) I develop on Windows XP and test on the same version (2.3) of J9, as
    I'm using on WM5.

    2) I refer to the following:

    http://java.sun.com/products/cdc/reference/cdc_packages.pdf
  • SystemAdmin
    SystemAdmin
    9394 Posts

    Re: Best way to build

    ‏2008-01-08T02:46:30Z  
    So it looks like there is no way to flag those errors at compile time?
    Shame.

    But yes, I have that chart handy all the time. I can't remember what class
    it was but the class in question was missing some methods. So that chart
    didn't help too much. Like I said, it's not the end of the world because the
    issues do get caught at runtime but it would be nicer to get them at compile
    time. Ah well.

    Thanks for the help!

    Phil

    <JRancier@penntraffic.com> wrote in message
    news:fllne3$1i43u$1@news.boulder.ibm.com...
    On 01/03/2008 08:59:32 AM "Phil"wrote:

    I build my WM5/WEME 6.1 application using jdk 1.4 and it works very well.
    I
    had an issue the other day though where I wrote some code only to find
    out
    at runtime that I had utilized an unsupported class (can't remember what
    it
    was). Not the end of the world, I went back and made a substitution and
    the
    world was right again.

    My question is: is there a way to detect unsupported classes/methods
    before
    runtime, ie at compile time?

    I do two things:

    1) I develop on Windows XP and test on the same version (2.3) of J9, as
    I'm using on WM5.

    2) I refer to the following:

    http://java.sun.com/products/cdc/reference/cdc_packages.pdf
    Why don't you use the bootclasspath option of JDK javac?

    If you are compiling for WEME CDC/FP 1.0, type like this:

    javac -source 1.3 -target 1.3
    -bootclasspath /path-to-weme/lib/jclFoundation10/classes.zip http://your .java files

    This should detect J2SE-only features used in your code.

    If you are building for CDC/FP 1.1, use "-source 1.4 -target 1.4" instead,
    and point to the jclFoundation11/classes.zip.
    If you are building for PPro, add the WEME PPro class library to the
    bootclasspath option.

    Hope this helps.

    KONNO Kazuhiro
  • SystemAdmin
    SystemAdmin
    9394 Posts

    Re: Best way to build

    ‏2008-01-08T20:51:31Z  
    Why don't you use the bootclasspath option of JDK javac?

    If you are compiling for WEME CDC/FP 1.0, type like this:

    javac -source 1.3 -target 1.3
    -bootclasspath /path-to-weme/lib/jclFoundation10/classes.zip http://your .java files

    This should detect J2SE-only features used in your code.

    If you are building for CDC/FP 1.1, use "-source 1.4 -target 1.4" instead,
    and point to the jclFoundation11/classes.zip.
    If you are building for PPro, add the WEME PPro class library to the
    bootclasspath option.

    Hope this helps.

    KONNO Kazuhiro
    Hi Konno,

    Thank you for the information, it sounds very promising! I will give it a
    try when I have some time.

    Phil

    "KONNO Kazuhiro" <no_spam@127.0.0.1> wrote in message
    news:fluo6e$1n82g$1@news.boulder.ibm.com...
    Why don't you use the bootclasspath option of JDK javac?

    If you are compiling for WEME CDC/FP 1.0, type like this:

    javac -source 1.3 -target 1.3
    -bootclasspath /path-to-weme/lib/jclFoundation10/classes.zip [your .java
    files]

    This should detect J2SE-only features used in your code.

    If you are building for CDC/FP 1.1, use "-source 1.4 -target 1.4" instead,
    and point to the jclFoundation11/classes.zip.
    If you are building for PPro, add the WEME PPro class library to the
    bootclasspath option.

    Hope this helps.

    KONNO Kazuhiro
  • StanleyGambarin
    StanleyGambarin
    4 Posts

    Re: Best way to build

    ‏2008-03-14T08:36:34Z  
    Hi Konno,

    Thank you for the information, it sounds very promising! I will give it a
    try when I have some time.

    Phil

    "KONNO Kazuhiro" <no_spam@127.0.0.1> wrote in message
    news:fluo6e$1n82g$1@news.boulder.ibm.com...
    Why don't you use the bootclasspath option of JDK javac?

    If you are compiling for WEME CDC/FP 1.0, type like this:

    javac -source 1.3 -target 1.3
    -bootclasspath /path-to-weme/lib/jclFoundation10/classes.zip [your .java
    files]

    This should detect J2SE-only features used in your code.

    If you are building for CDC/FP 1.1, use "-source 1.4 -target 1.4" instead,
    and point to the jclFoundation11/classes.zip.
    If you are building for PPro, add the WEME PPro class library to the
    bootclasspath option.

    Hope this helps.

    KONNO Kazuhiro
    Phil,

    you can also use 'ecj' (Eclipse) Java compiler or 'j9c' (which
    is based on ecj) to compile your Java applications. We have found
    that using 'ecj' to compile your java code actually produces faster
    code (vs. Sun's javac) for certain applications. Make sure to
    specify '-inlineJSR' option when using above compilers (otherwise,
    the code may not run on J9)