McKown, John wrote:
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Hunkeler Peter (KIUB 34)
Sent: Wednesday, May 24, 2006 1:33 AM
To: [email protected]
Subject: Re: A little more insight on the Java strangeness I'm encountering



I swear I could run Java classes without saying 'java'
but it must be the ol' memory failure again.

Any chance this remembrance is related to playing on Windoze? Or on a Mac? They care for file extensions,
UNIX does not.

BTW, someone mentioned the execute bit being set. .class files don't need it, don't set it.


Peter Hunkeler
CREDIT SUISSE


Talk about a weirdness. I just checked my "Howdy.java" file, which the
shell attempted to execute and IT DOES NOT HAVE THE EXECUTE BIT ON! The
shell should NOT even attempt to run the file, what is with that? That
is WRONG, WRONG, WRONG!

No, it's RIGHT, RIGHT, RIGHT!

As Peter mentioned above, the file does not need the execute
bit set: it is not executable.

What is executable is the JVM. So the "java" command must
have the execute bit set; when you enter:

java Howdy

then the JVM runs and interprets the byte code in Howdy.class.

It all makes {perfect | reasonable} sense.




And if I invoke the BASH shell, I get:

bash: ./Howdy.class: cannot execute binary file

With the tcsh shell, I get:

./Howdy.class: EDC5130I Exec format error.. Binary file not executable.

Hum, sounds like it is time for a little talk with z/OS UNIX shell
programmers.

No. Class files are not executable in the classic sense: they
are interpreted by "java".

Kind regards,

-Steve Comstock

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to