-
September 15th, 2011, 10:15 AM
#1
Help understanding
So there is the java language you use to code, which is compiled and ends up being the JNI? But, there are also java commands like goto, that I have only seen when dealing with .bat files or basically GUI. So the main java language is to JNI, whereas the commands are to GUI?
-
September 15th, 2011, 01:25 PM
#2
Re: Help understanding
the java language you use to code, which is compiled and ends up being the JNI
No. The compiled code is the .class file which is read and interpreted by the java program
there are also java commands like goto
No. Java does not have commands. goto is a statement in some other computer languages.
Norm
-
September 15th, 2011, 04:08 PM
#3
Re: Help understanding
Originally Posted by kolt007
So there is the java language you use to code, which is compiled and ends up being the JNI? But, there are also java commands like goto, that I have only seen when dealing with .bat files or basically GUI. So the main java language is to JNI, whereas the commands are to GUI?
Sounds familiar. Bobgateaux or Kingofthejav I presume?
-
September 15th, 2011, 05:27 PM
#4
Re: Help understanding
Originally Posted by Norm
No. Java does not have commands. goto is a statement in some other computer languages.
I've used goto like this
Code:
if exists %program files%/java/jdk (goto end)
:end
%programfiles%/internet explorer/iexplore.exe
exit
Also, you say no but, I thought JNI was the .class file's I thought that was the native interface? If not what is it called?
-
September 15th, 2011, 05:33 PM
#5
Re: Help understanding
.class files contain byte code
Norm
-
September 16th, 2011, 02:41 AM
#6
Re: Help understanding
Originally Posted by kolt007
I've used goto like this
Also, you say no but, I thought JNI was the .class file's I thought that was the native interface? If not what is it called?
In most cases the Java source code is compiled to an intermediate language called bytecode. This bytecode is then run by a program called the JVM (Java Virtual Machine). The JVM is formally an interpreter but it's very advanced. It performs compilations of the bytecode to native machine language on the fly while the program is running. This makes Java programs very fast, almost as fast as programs that are compiled to machine language before they're run (which is possible to do also with Java programs (with the help of a so called Java native compiler)).
The JNI (Java Native Interface) is a specification telling how one can make code written in other languages part of a Java program.
-
September 16th, 2011, 11:48 PM
#7
Re: Help understanding
what about .bat does .bat use different API classes then the normal java code? I think it's doubtfull but, some how when you give a file the extension '.bat' it inherits things like a direct link to a shell window? HOw does that work is that run by JVM because I don't even need to compile a .bat...
-
September 17th, 2011, 08:51 AM
#8
Re: Help understanding
A .bat file has nothing to do with Java, it is text file containing commands which are interpreted by the Windows command interpretor. See the article.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|