Query:What's the difference between executable file and binary file?

Discussion in 'Java' started by Jack Dowson, May 7, 2007.

  1. Jack Dowson

    Jack Dowson Guest

    Hello Everybody:
    I offen hear about executable file and binary file while learning java
    ,what's the difference between them?

    Thanks in advance!

    Dowson.
     
    Jack Dowson, May 7, 2007
    #1
    1. Advertising

  2. Re: Query:What's the difference between executable file and binaryfile?

    Jack Dowson wrote:
    > Hello Everybody:
    > I offen hear about executable file and binary file while learning java
    > ,what's the difference between them?
    >
    > Thanks in advance!
    >
    > Dowson.

    A executable file is a file that you can execute by double clicking on
    it (i guess). A binary file is a file that the java compiler makes from
    the java source code that you wrote (the .java file). The compiler
    compiles the file into a .class file that is binary, it is the jvm (java
    virtual machine) that then interprets the .class file.
     
    Mathias Mejborn, May 7, 2007
    #2
    1. Advertising

  3. Jack Dowson

    Guest

    binary generally means "not character" as in, there is no character
    coding to take into account when reading the file. no line feeds, end
    of line characters, no character sets, etc. I mean, all files are
    'binary' information, as in 1's and 0's, but binary files the way you
    are using it means essentially 'cannot be read in a text editor'.

    executable, on the other hand, means different things to different
    operating systems. on windows it means .exe (or .com) file extension
    in a particular format that windows knows how to run and understand.
    In some cases a .jar file can be executable in that windows sends it
    to jar.exe and jar.exe knows how to run the java files inside, which
    is probably what you are seeing. in no case (or exceedingly rare
    cases) will you have a java program output an executable file.

    executable in unix (or linux) means the 'executable' flag is set in
    the directory. the shell reads the first line to see what if it is a
    script file and if so what script engine to use (shell, perl, ???)
    (not 100% clear on the details here).

    apples and oranges here, like asking what's the difference between red
    and hard?

    On May 7, 7:49 am, Jack Dowson <> wrote:
    > Hello Everybody:
    > I offen hear about executable file and binary file while learning java
    > ,what's the difference between them?
    >
    > Thanks in advance!
    >
    > Dowson.
     
    , May 7, 2007
    #3
  4. Jack Dowson

    Jack Dowson Guest

    Re: Query:What's the difference between executable file and binaryfile?

    I've installed RedHat Linux and windows only!So your answer will be
    enough to me!
    Thank you!

    Dowson.
     
    Jack Dowson, May 7, 2007
    #4
  5. Jack Dowson

    Roedy Green Guest

    On Mon, 07 May 2007 22:49:56 +0800, Jack Dowson <>
    wrote, quoted or indirectly quoted someone who said :

    >I offen hear about executable file and binary file while learning java
    >,what's the difference between them?


    "binary" just means not human readable. "Executable" files are a
    subset of those, that will run a program when you click them. A class
    file is binary, but not executable. A jar file is both if it has a
    main-class entry and there is an association set up.
    See http://mindprod.com/jgloss/associations.html
    --

    Roedy Green Canadian Mind Products
    The Java Glossary
    http://mindprod.com
     
    Roedy Green, May 7, 2007
    #5
  6. Roedy Green <> wrote in
    news::

    > On Mon, 07 May 2007 22:49:56 +0800, Jack Dowson <>
    > wrote, quoted or indirectly quoted someone who said :
    >
    >>I offen hear about executable file and binary file while learning java
    >>,what's the difference between them?

    >
    > "binary" just means not human readable. "Executable" files are a
    > subset of those, that will run a program when you click them. A class
    > file is binary, but not executable. A jar file is both if it has a
    > main-class entry and there is an association set up.
    > See http://mindprod.com/jgloss/associations.html


    Hi Roedy:

    "Executable" files aren't a strict subset of "binary" files -- ".bat" files
    are executable and are plain-text on Windows, shell and perl scripts are
    likewise on *nix. The two categories seem to me to be orthagonal.

    Cheers!

    --
    ---------------------------------------------------------------------
    Greg R. Broderick

    A. Top posters.
    Q. What is the most annoying thing on Usenet?
    ---------------------------------------------------------------------
     
    Greg R. Broderick, May 7, 2007
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jakk
    Replies:
    4
    Views:
    12,250
  2. =?Utf-8?B?c3VyZXNoX0Mj?=
    Replies:
    8
    Views:
    7,417
    =?Utf-8?B?TWFoZXNoIE5pbWJhbGthcg==?=
    May 3, 2005
  3. Replies:
    15
    Views:
    491
    Dave Thompson
    Aug 21, 2006
  4. Replies:
    4
    Views:
    389
    James Kanze
    Oct 11, 2007
  5. manu
    Replies:
    11
    Views:
    1,663
    Default User
    Jan 5, 2009
Loading...

Share This Page