Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: "write once, run anywhere"

by nimdokk (Vicar)
on Sep 10, 2007 at 13:43 UTC ( #638068=note: print w/ replies, xml ) Need Help??

in reply to "write once, run anywhere"

I can say that when trying to make Perl platform independent (at least with what we do), we have to occasionally put in an if/then based on the OS. Most of the time, this is handled behind the scenes either in a module or in standard sections of code that my co-workers do not need to worry about modifying. I find that I need to combine $^O and File::Spec (Unix or Win32) to get what I need (paths will be different for what we do based on the OS in question).

It is my understanding that while the Java code would remain the same regardless of platform, the JVM might have differences in it based on the OS and compilers. If the JVM works the same as the Perl executable, then there might not be much difference (from a scripts perspective between OS platforms). There of course would be differences in the underlying exectuble that is invoked.

Please also bear in mind that I Am Not An Expert and could be completely wrong in all my comments :-).

Comment on Re: "write once, run anywhere"

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://638068]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2015-11-27 21:13 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (732 votes), past polls