Java Software Applications (.exe)
Hi,
I'm already on the 150th page of a Java book for learning the language, and I realized I'm not sure if this is the language for me. I was under the impression it was made to be better and easier to understand than C++, which can be compiled into executable (.exe) programs that run off of a computer. I thought Java would also be able to do that.
However, as I get farther into the book I'm not seeing anything like that and I skipped ahead to the chapters on Swing. As I look more into that Swing appears to only be able to work through Java Web Start which makes it a web application, not something like a program that works on a computer like a .exe
I'm a bit confused. Could someone please clear this up for me? Thanks and its much appreciated.
To kind of add-on to the original post, I'm asking whether Java can be used to develop applications for other people that do not need to be run in a web-browser such as IE, Netscape, or FireFox.
It has been asked and answered several times before. Have you even searched the forum?
You can always bundle the JRE with your JAR file and put them into a windows executable. But it's not recommended and Java in not intended to create platform-dependent applications.
By the way, what was your motivation to learn Java?
> To kind of add-on to the original post, I'm asking
> whether Java can be used to develop applications for
> other people that do not need to be run in a
> web-browser such as IE, Netscape, or FireFox.
Sure. Go ask google on how to do this. Sun tutorials will help you too.
Java can be used in whatever way you like.
Java code does not run directly on your computer's hardware, however. Instead it runs in a Java Virtual Machine (JVM).
Applets and Java WebStart are two ways to start a JVM from a webpage.
Activating (double-clicking on Windows) a .jar file is a way to start a JVM in a desktop environment.
Finally, starting the java executable (java.exe) with appropriate parameters from a command line shell is another (but less user-friendly) way to start a JVM and run a program.
For server applications, Java programs can be run from the command line, deployed as war files, ear files or other mechanisms, depending on the application.
Thank you for your assistance all of you. I understand that .jar files will work similiar to .exe when run on desktop's which is what I want at the moment.
I do have one other easy question: Is Java Virtual Machine installed on most computers (Windows)? I ask this because when I develop the applications, I plan to distribute them by disc to normal computer users who will not be doing much more with Java than have visited sites powered by Java.
Thanks in advance!
This "disc" you mention is a CD, isn't it? Then why not just distribute a JRE along with your application, and have the application use that instead of any JREs that might already be on the user's computer?