Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Query:What's the difference between executable file and binary file?

Reply
Thread Tools

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

 
 
Jack Dowson
Guest
Posts: n/a
 
      05-07-2007
Hello Everybody:
I offen hear about executable file and binary file while learning java
,what's the difference between them?

Thanks in advance!

Dowson.
 
Reply With Quote
 
 
 
 
Mathias Mejborn
Guest
Posts: n/a
 
      05-07-2007
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.
 
Reply With Quote
 
 
 
 
christopher@dailycrossword.com
Guest
Posts: n/a
 
      05-07-2007
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 <(E-Mail Removed)> 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.



 
Reply With Quote
 
Jack Dowson
Guest
Posts: n/a
 
      05-07-2007
I've installed RedHat Linux and windows only!So your answer will be
enough to me!
Thank you!

Dowson.
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      05-07-2007
On Mon, 07 May 2007 22:49:56 +0800, Jack Dowson <(E-Mail Removed)>
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
 
Reply With Quote
 
Greg R. Broderick
Guest
Posts: n/a
 
      05-07-2007
Roedy Green <(E-Mail Removed)> wrote in
news:(E-Mail Removed):

> On Mon, 07 May 2007 22:49:56 +0800, Jack Dowson <(E-Mail Removed)>
> 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 http://www.velocityreviews.com/forums/(E-Mail Removed)

A. Top posters.
Q. What is the most annoying thing on Usenet?
---------------------------------------------------------------------
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between BINARY mode file opening and TEXT mode fileopening manu C Programming 11 01-05-2009 03:30 AM
any link and binary level difference between c++ struct and class? kjin101@gmail.com C++ 4 10-11-2007 09:48 AM
How can I run a c executable in pwd ,while the executable is in some other directory vishsid3@gmail.com C Programming 15 08-21-2006 06:04 AM
Difference between Portable Executable (PE) file and a Assembly =?Utf-8?B?c3VyZXNoX0Mj?= ASP .Net 8 05-03-2005 01:25 AM
Difference between bin and obj directories and difference between project references and dll references jakk ASP .Net 4 03-22-2005 09:23 PM



Advertisments