Write once, run anywhere philosophy

Here is the text from JAVA2COMPLETE Reference about Character Streams.
While the byte stream classes provide sufficient functionality to handle any type of I/O operation, they cannot work directly with Unicode characters. Since one of the mainpurposes of Java is to support the�write once, run anywhere� philosophy, it was necessary to include direct I/O support for characters. My doubt is that Why is that WRITE ONCE RUN ANYWHERE philosophy not applicable for Byte Streams.

Here is the text from JAVA2COMPLETE Reference about Character Streams.
While the byte stream classes provide sufficient functionality to handle any type of I/O operation, they cannot work directly with Unicode characters. Since one of the mainpurposes of Java is to support the�write once, run anywhere� philosophy, it was necessary to include direct I/O support for characters.
My doubt is that Why is WRITE ONCE RUN ANYWHERE philosophy not applicable for Byte Streams.

Similar Messages

  • Programming on SIM??? write once, run anywhere???

    Dear all,
    I am a java developer for 2 years, everytime i read any java book, it stated there "write once, run anywhere", but does it really perform that? especially when we develope in J2ME, MIDP, CLDC is a main consideration for different phone. Different phones requires different CLDC n MIDP, developer have to develope different program for that. But, if we can develope program into Java SIM card, is that make sense of the phase "write once, run anywhere"?
    Due to the limited space, limited processor power, limited RAM on a little SIM card... how about we have a brainstorming session here to discuss about what kind of program that mobile phone user really want in their SIM? SIM card program is interoperability with every phone, and i think user will prefer to store more personalized things to SIM.......
    So, do u guys have any ideas on SIM?
    Best regards,
    Ric

    What does the fact that Java6 doesn't exist onOS/X
    have to do with anything? Java6 didn't make
    enough
    changes to swing that it matters.
    The tray icon capability is a new feature in Java6.
    and Mac OS doesn't have a system tray like Windows
    does so there's nowhere to display the icon...http://www.ubuntu.com/
    It's for the best, really.

  • Does "Write Once, Run Anywhere" (WORA) really exist?

    Does "Write Once, Run Anywhere" (WORA) really exist?

    Absolutely. You can write applications that will run on any
    J2EE-compatible application server. Although a few cases are very
    difficult, in many cases more can be done than you may realize. Java
    BluePrints (http://java.sun.com/blueprints) is the proof point here.
    Each year, we run the Deployathon
    (http://java.sun.com/developer/technicalArticles/J2EE/deployathon4/)
    which demonstrates a significant J2EE application running on multiple
    J2EE-compatible application servers.

  • "Write once, run anywhere" - Error on MacOS X running TrayIconDemo - JNI?

    I can not get the TrayIconDemo running on MacOS X... "Write once, run anywhere" broken? How can I use pure Java when I have to write MacOS X specific trayicons to get around the fact that MacOSX does not support lastest Java, and no official say when Java will be avalibale.
    http://java.sun.com/docs/books/tutorial/uiswing/examples/misc/TrayIconDemoProject/src/misc/TrayIconDemo.java

    What does the fact that Java6 doesn't exist onOS/X
    have to do with anything? Java6 didn't make
    enough
    changes to swing that it matters.
    The tray icon capability is a new feature in Java6.
    and Mac OS doesn't have a system tray like Windows
    does so there's nowhere to display the icon...http://www.ubuntu.com/
    It's for the best, really.

  • Write once run anywhere

    Is it possible to write one application that can run on Notebook, Palm OS and Win CE PDAs ?
    If can, how? What tools and APIs do I need? How about the jvm?
    If can't, why?
    I need to know it asap, waiting for your helps, thanks.

    Hi!
    I don't think so. There is no unique VM availale to that variety of platforms.
    The big problem is to get a VM that runs under those platforms. There is one kind of VM available to PDAs - personal Java -, other to notebooks and PC's - J2SE -, other to Palm devices - J2ME CLDC MIDP-.
    3 VM to three kind of devices with different features, although the Personal Java apps probabily would be compatible with J2SE...
    Marco Caetano

  • Why java is called platform independent? "write once, run anywhere" code...

    I do have a answer for this. Please shed some light whether i am right or wrong.
    When you say java as platform independent, it means that, any java program once compiled to java class can be transferred to anyother machine(say, from windows to unix) can be executed, provided the destination machine has JVM.
    where as, in C/C++, if we transfer the object files from one machine to another machine, they will not be executed and they have to be re-compiled in the other machine.
    Am i correct?
    please, do give me your idea on this...
    thanks...

    Thanks george !

  • JNI Not write once run anywhere But...

    I have written a program that I put into C++ for speed reasons. I now want to use the JNI to
    a) Get familiar with the JNI
    b) To merge a Java GUI and speedy code together.
    I've read that if you use the JNI then you cannot run your program everywhere. But I thought about programs written in C/C++ that do run everywhere, with respect to say the OS.
    So isn't it possible to still have that via the JNI?

    I have written a program that I put into C++ for
    speed reasons. So, you measured the speed of a Java prototype and a C++ prototype and found the Java version to be significantly slower?
    Or you just assumed it would be?
    I've read that if you use the JNI then you cannot run
    your program everywhere. But I thought about programs
    written in C/C++ that do run everywhere, with respect
    to say the OS.You may be able to use the same C/C++ source code, depending on what it's doing, but you'll at least have to recompile the native code. A Windows DLL can't be used on a Linux box.

  • XML Anywhere TO Write Once , Run Everywhere

    I proposed this 4 years ago to cho haha reply.
    All codebase languages , legacy codebase , legacy code , etc . . . standardized into am XML file.
    MVC no. XVC yes. Xml View Controller yes.
    Xml Namespace yes. Xml Redirection_One Namespace yes.
    Xml Redirection_Two Namespace yes.
    No one says the word XHTML let alone XDHTML. Or SGML.
    At Intel Forum-- [http://communities.intel.com/people/ajaytemp?view=profile] -------
    The World Wide Web Consortium (W3C) is the main international standards organization for the World Wide Web (abbreviated WWW or W3).
    Founded and headed by Tim Berners-Lee,[2] the consortium is made up of member organizations which maintain full-time staff for the purpose of working together in the development of standards for the World Wide Web. As of 10 July 2011, the World Wide Web Consortium (W3C) has 317 members.[1]
    W3C also engages in education and outreach, develops software and serves as an open forum for discussion about the Web.
    Is HTML3,4,5 in conformance to XML or XHTML ? Or X-HTML ? Why is ther HTML and then XHTML. I didn't see SGML consortium.
    This fissure or crack which seems to have caused a bumpy road for Web Browser producers is really annoying.
    It won't cause problems is really dumb.
    XML has been around for a decade or so . . .
    So if I write XHTML code. Will older browsers show it ?
    I felt like there is HTML and then there is XHTML.
    HTML requires a DTD tag at top which is really weird if you ask a layman what that is. Some standard from really old days.
    THen there is HTML transition standard, a 2nd , a 3rd... If it's a standard and everyone could write HTML code and be a public publisher or FREE speech.
    Then certain keywords are deprecated in one version, another version it's good to show. Makes no sense what is going on with browsers and their best attempts to get close to a W3C standard.
    Shame.
    They have strict, frameset, and then transitional versions of HTML, DHTML, or XHTML, XDHTML. What's the need for four or five more Standards. Not a standard even a Protocol now.
    It would of been easier to write Mandarin (chinese) code in ISO C or ANSI C then put up a simple egnlish home page i write in word pad or note pad.
    They Javascript Event Handling Methods are deprecated. A new one is added.
    It's really all unncessary. And this is making students life difficult is understatement.
    UGGGGGGGGLY.
    See Berkshire Hathaway home site for QUALITY HOME PAGE. Always see GOOGLE.COM home site. Quality matters.

    Large corps can't cooperative with college grads with COOP. Fine. It doesn't matter with .xml Lingua Franca .
    Older systems have compatibility now with the 3 letter extension !
    corperative dot_xml

  • What about "write once, run everywhere" with web services ?

    Hi all,
    I'm very new to web services in Java (but not new at all in Java and not really new in web services).
    I'm amazed of not finding a specification API for web services. It doesn't seem that I can write a web service (or a web service client) and run it under several "web services containers" (like we can do for servlets, JDO and pretty all java technologies). It seems - according to the tutorials I found yet - that if I want to make a web service that runs under Apache Axis, I must use org.apache.axis.* classes, and so on with WebLogic and other web services container...
    It doesn't look like java style and I'm kind of confused...
    could someone give me details ? am I wrong or something ?
    TIA

    I think is not that bad.
    You have two APIs in the jwsdp tool just for web services (JAXRPC and JAXM) and you can construct your web services and your clientes wit that. Once you compile with the tool and you get the WSDL and the model I think that you can deploy it in any container (I think)
    hope it hepls

  • File System Case Sensitive - breaks Write-Once

    I don't find a System property that denotes if the file system is case sensitive.
    If I want a FileFilter to behave as the user is expecting - it must know if the file system that it is running on is case sensitive. For example: On a DOS system the file apple.txt should be returned with the file PEACH.TXT by a FileFilter that is accepting *.TXT files. But on a Unix system only the PEACH.TXT would be returned (case sensitive).
    How would I make my FileFilter a true write-once-run-anywhere class?
    What am I missing?
    David

    For a file filter,
    you can get the file name and convert it to lowercase,
    then compare to a lowercase extension. It's not like
    that will rename the file, the file will still have
    whatever name the file has. However for a FileFilter that is case sensitive - there is a difference in what a File.listFiles(new ExtensionFilter("txt")) returns. And one can not just decide that it doesn't matter.
    Here's a specfic example. On a case insensitive system what is the next file in the sequence of:
    File.001, File.002, File.003, file.004
    Answer: fILE.005 - is valid
    But on a case sensitive system if one uses a FileFilter to find all the files that match "File".* then the answer is "File.004" - ONLY ONE answer, and creating this file will not (should not) overwrite the file.004!
    Seems to me one needs to match the FileFilter to the underling OS - because chances are the user is expecting OS file system naming conventions. If the user doesn't know what file system (and can't know - like on a web server app) then the system better be smart enough to not mess up and clober files.
    So it appears to me that a programmer needs to be able to ask the System what it's file system convention is. And sure I could guess based on some other properties (System.os.name or as Sun did based on file.separator) - but I was hopeful that I didn't need to GUESS.

  • Can I write and run simple java programs in Xcode

    I need to write and run basic java programs on my mac. I would like to run it in Xcode, but I don't know how to set it up? Is there a way?

    Read the following discussion from last month on here:
    Can Xcode 4.5.1 compile/run java?

  • Tuning for write once/small records

    Hello!
    I'm investigating using je with collections for a couple of repositories.
    My use cases center around write-once objects, with indexed access via subMap. The api and recovery features of je make it appear well-suited and convenient.
    One database receives writes of hundreds of small objects per second. This database uses a TupleTupleBinding with long (millisecond) keys. Sorted duplicate keys are enabled on this database. Also, I've left transactions enabled, but have specified "no txn sync" as true. The data part of the tuple binding is only two additional fields.
    Disk space is somewhat of a concern so I've set the "min file utilisation" parameter up to 90% from the 50% default. Even with this setting the file sizes appear "large" and 5x (?) larger than a simple text based log file. This is ok, but if there is anything that can be done to reduce the space required that would be helpful.
    The showstopper problem is that after many records have been inserted cpu utilisation is maxed for extended periods of time. It appears that the cleaner is doing a lot of work and I can see earlier log files disappearing.
    The application requires consistent throughput and both the additional cpu and IO utilisation mean that as things stand we can't use je. Until the cleaner (I presume) kicks in, performance appears great.
    Is there a way to configure je to write the records in a way that will not require cleaning?
    The records are being inserted "in order", and as mentioned, they are write once.
    Thanks in advance!
    Steven Marcus

    Hello Steven,
    Disk space is somewhat of a concern so I've set the
    "min file utilisation" parameter up to 90% from the
    50% default. Even with this setting the file sizes
    appear "large" and 5x (?) larger than a simple text
    based log file. This is ok, but if there is anything
    that can be done to reduce the space required that
    would be helpful.JE uses a log structured storage system and has a fair amount of overhead per record. We are working to improve this, but for now there isn't a lot you can do to reduce the disk space used, for an application that doesn't update or delete records.
    If you don't need durability during an initial load, you could set DatabaseConfig.setDeferredWrite(true) and some logging of internal nodes can be avoided. But I doubt that will have a big impact for your application.
    The showstopper problem is that after many records
    have been inserted cpu utilisation is maxed for
    extended periods of time. It appears that the cleaner
    is doing a lot of work and I can see earlier log
    files disappearing.This is because you've set minUtilization to 90. The cleaner operates efficiently at 50 -- this is due to using a log structured (append only) storage system.. So you're in a position where you'll have to trade-off disk space for performance.
    The application requires consistent throughput and
    both the additional cpu and IO utilisation mean that
    as things stand we can't use je. Until the cleaner (I
    presume) kicks in, performance appears great.
    Is there a way to configure je to write the records
    in a way that will not require cleaning?
    The records are being inserted "in order", and as
    mentioned, they are write once.You can certainly disable the cleaner by setting je.env.runCleaner=false, but this will use more disk space and is probably equivalent to setting minUtilization=50 (the default) for an application that does not update or delete records.
    You can also disable checkpoints, at least temporarily, by setting je.env.runCheckpointer=false. Because you are never updating or deleting records, the "wasted" space in your log is due to checkpoints. Checkpoints are necessary to bound recovery time, but if you are doing an initial load, you may be able to do without them until the load is complete.
    If you are writing records continuously (not doing an initial load), then it is likely that you need to bound recovery time. You may want to experiment with larger checkpoint intervals. The je.checkpointer.bytesInterval property is 20000000 (20m) by default. For example, trying doubling or tripling that to checkpoint less frequently.
    Please see the FAQ for related information.
    http://www.oracle.com/technology/products/berkeley-db/faq/je_faq.html
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Once running the labview program which contain DAQ Assistant ,the message of "ERROR-50405....." appear.

    Once running the labview program which contain DAQ Assistant and can be run without any error before, the message box of "ERROR-50405....." appear which capture down in the attachment. We use PCI6221 and LabVIEW 8.0 in Windows XP. I also found that the Device Manager of Window have recognized the PCI6221.
    Any help on this situation would be great.
    Attachments:
    labview error.JPG ‏145 KB

    Hi~
    This error is due to signal interference between the device and the computer. This could be environmental or due to the PCI Controller. You can on a different computer to see whether this problem persists.

  • Start once, run everywhere in a cluster

    Hi,
              what are easy ways to perform the following tasks:
              1) How can I ensure that some funcionality is only startet once in a
              cluster. And to complicate it. When the functionality isn't running any
              more, start it at another member in the cluster.
              2) The oposite: How can I ensure that some code is run on every memeber
              of a cluster.
              Thanks for suggestions.
              Anthony
              

    Let me answer the easy one first:
              > 2) The oposite: How can I ensure that some code is run on every memeber
              > of a cluster.
              Use a Servlet with load on startup and use the init method as if it were a
              "startup class".
              > 1) How can I ensure that some funcionality is only startet once in a
              > cluster. And to complicate it. When the functionality isn't running any
              > more, start it at another member in the cluster.
              A little trickier. Coordinating work across a cluster is possible with a
              combo of JNDI and/or JMS but it's not easy / foolproof. Sounds like you need
              a coherent cache to share state across the entire cluster ;-)
              Cameron Purdy
              Tangosol Inc.
              Tangosol Coherence: Clustered Coherent Cache for J2EE
              Information at http://www.tangosol.com/
              "Anthony Schmude" <[email protected]> wrote in message
              news:[email protected]..
              > Hi,
              >
              > what are easy ways to perform the following tasks:
              >
              > 1) How can I ensure that some funcionality is only startet once in a
              > cluster. And to complicate it. When the functionality isn't running any
              > more, start it at another member in the cluster.
              >
              > 2) The oposite: How can I ensure that some code is run on every memeber
              > of a cluster.
              >
              > Thanks for suggestions.
              >
              > Anthony
              

  • How do I write and run c++ programs via terminal?

    First off, if this is the wrong place to post, my apologies. I'm running arch off a raspberry pi, and sshing into it on my computer (a mac, if it makes a difference), and I was wondering how I could run c++ programs on it. I don't want to install a desktop environment, because I think using terminal is a cool challenge. I'm assuming I can just use nano or some other text editor to write them, but how do I get them to run, as well as get all the libraries I would need? I am thinking just things that run in terminal, no programs with a gui. Any suggestions?

    First, I am going to suggest you take Arch Arm questions to their forums.    They are the experts.
    But, what you ask is easy -- if the tools are installed on your ras-pi.  Here is some code I did not write that generates data that can be piped to gnuplot to animate a Lorenz  attractor. 
    ewaller$@$odin ~/devel/C/lorenz [130]1026 %cat lorenz.cpp
    #include <iostream>
    #define tab "\t"
    using namespace std;
    void lorenz(double *x,double *dxdt)
    dxdt[0]=10.0*(x[1]-x[0]);
    dxdt[1]=28.0*x[0]-x[1]-x[0]*x[2];
    dxdt[2]=-2.666666666666*x[2]+x[0]*x[1];
    int main(int argc,char **argv)
    int len=300;
    double x[len*3],dxdt[3],dt=0.01;
    x[0]=1.0;x[1]=1.0;x[2]=1.0;
    int cur=0,next=1;
    for(int i=1;i<len*10;i++)
    lorenz(x+3*cur,dxdt);
    for(int j=0;j<3;j++) x[3*next+j]=x[3*cur+j]+dt*dxdt[j];
    if(++cur == len) cur=0;
    if(++next == len) next=0;
    for(double t=0.0;t<100000000.0;t+=dt)
    cout<<"sp [-30:30][-30:30][0:50] '-' w l"<<endl;
    for(int i=cur+1;i<len;i++)
    cout<<tab<<x[3*i]<<tab<<x[3*i+1]<<tab<<x[3*i+2]<<endl;
    for(int i=0;i<cur+1;i++)
    cout<<tab<<x[3*i]<<tab<<x[3*i+1]<<tab<<x[3*i+2]<<endl;
    cout<<'e'<<endl;
    lorenz(x+3*cur,dxdt);
    for(int j=0;j<3;j++) x[3*next+j]=x[3*cur+j]+dt*dxdt[j];
    if(++cur == len) cur=0;
    if(++next == len) next=0;
    return 0;
    ewaller$@$odin ~/devel/C/lorenz 1027 %g++ lorenz.cpp
    ewaller$@$odin ~/devel/C/lorenz 1028 %./a.out|head
    sp [-30:30][-30:30][0:50] '-' w l
    -9.3252 -8.45882 29.0952
    -9.23857 -8.27211 29.1081
    -9.14192 -8.08701 29.0961
    -9.03643 -7.90593 29.0595
    -8.92338 -7.73113 28.999
    -8.80415 -7.56467 28.9156
    -8.68021 -7.40841 28.8105
    -8.55303 -7.26397 28.6853
    -8.42412 -7.13271 28.5417
    ewaller$@$odin ~/devel/C/lorenz 1029 %
    You may want to set up a cross compiler on your x86_64 Arch system for ARM.  That we can help you with....

Maybe you are looking for

  • Magic Mouse and Trackpad Become Randomly Eratic

    My setup: 2011 Macbook Pro 27" Thunderbolt Display Wireless Keyboard TrackPad Magic Mouse My Problem: about once every 2 or 3 days, my mouse and trackpad will become eratic (at the same time) Im unable to reliably control them and the cursor will mov

  • ABAP OBJECTS: Dynamic Create object

    Hi folks! I have a problem... I need to create a dynamic type object with: <b>DATA: my_instance TYPE REF TO class1. CREATE OBJECT my_instance TYPE (class2).</b> <i>* where class1 is a superclass of class2.</i> When I do: <b>my_instance ?= m_parent.</

  • Error 1305: Data1.cab

    When I was updating my Adobe Reader to 9.3, it got to 99.9 then I got a message saying that I had to "Verify that the file exists and that you can access it." Well, it was in a folder on my desktop where it was supposed to be, I opened the cabinet fi

  • Hostid in smqr ?

    Hi, What does host-id means in SMQR and SMQS  ??? Is it where the qin/qout scheduler is running ??? Thank you.

  • Making sure a button does not get focussed

    Hey there I'm currently building a small search banner which comprises of three fields and a search button. The banner works great and all the fields respond well however if I use the tab key on the keyboard to move from one field to the next the sea