Hi Nico Kadel-Garcia!

 On 2015.01.29 at 23:10:40 -0500, Nico Kadel-Garcia wrote next:

> >
> > These are not exactly the same as Oracle Java and, unfortunately, some Java
> > applications only work with Oracle Java.
> 
> Name 2. Seriously: I've heard this again and again since Java.... 1.4?
> I've not actually encountered any instance except where someone
> hardoced something, deliberately, to *insist* on it. And ever since
> Java 1.5.0, as soon as I or a colleague broke that lock, the
> alternative OpenJDK worked just fine.
> 
> Part of the point of Java was to be "write once, run anywhere". While
> this has proven to be demonstrably untrue, similar versions of Java on
> the same OS have behaved pretty well for compatibility simply because
> they follow the specs.

It's not like every application follows the spec.
I can give you an example straight away: Tyan's IPMI-based remote KVM
(based on AMI MegaRAC). Not sure if it's Tyan's fault or AMI, but it
returns .jnlp file for Java WS which contains

    <application-desc>
        <argument>ipmi-casper</argument>
        <argument>7578</argument>
        
<argument>kmADFSAjkdfywfjk^B<argument>1X1wjeByuasdkKI650KdsfsJadsajKjJ000</argument>
</argument>

I replaced some characters in hashed username/password but otherwise
it's exact. "^B" here is Control-B (symbol with code 0x02).

How would you parse last line in this XML file? OpenJDK's XML parser
(nanoxml in this case) can't! You get exception instead. Moreover, I
have no idea how to modify this file to make it work - replacing ^B with
</argument> or ^B</argument> doesn't work, it makes XML correct but it
won't work then because it's not the same as when Oracle JDK parses it.

Oracle JDK parser in their implementation of Java WS somehow parses
this, ignoring malformed data and works as expected.

(yes I contacted Tyan support and their reply was "supported and tested
under Oracle JDK", they don't care that different Java implementations
might use different XML parsers).

-- 

Vladimir

Reply via email to