Hello Everybody:
I offen hear about executable file and binary file while learning java
,what's the difference between them?
Thanks in advance!
Dowson.
Mathias Mejborn - 07 May 2007 15:59 GMT
> Hello Everybody:
> I offen hear about executable file and binary file while learning java
[quoted text clipped - 3 lines]
>
> 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.
christopher@dailycrossword.com - 07 May 2007 16:03 GMT
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?
> Hello Everybody:
> I offen hear about executable file and binary file while learning java
[quoted text clipped - 3 lines]
>
> Dowson.
Jack Dowson - 07 May 2007 16:16 GMT
I've installed RedHat Linux and windows only!So your answer will be
enough to me!
Thank you!
Dowson.
Roedy Green - 07 May 2007 17:14 GMT
>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
Greg R. Broderick - 07 May 2007 21:33 GMT
>>I offen hear about executable file and binary file while learning java
>>,what's the difference between them?
[quoted text clipped - 4 lines]
> 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!

Signature
---------------------------------------------------------------------
Greg R. Broderick usenet200705@blackholio.dyndns.org
A. Top posters.
Q. What is the most annoying thing on Usenet?
---------------------------------------------------------------------