This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
I am a retired software engineer and would like to learn and tinker in Java with "console", "windows", and "applets".
Have installed MS J++ on my Windows system. When a "Windows project" is created with J++, it gives the "warning" (as i read it) that the "MS language extensions" must be loaded onto the system where the .exe is run.
Is there a Java Compiler/Linker (development kit) where I can build projects and send to friends to use who just have plain old vanilla Windows without any special language extensions?
Am hoping for one that is freeware or inexpensive.
Also am looking for a concise book that will give a good overview of Java.
I thought MS J++ was officially dead. i didn't know you COULD download/install it any more.
Never ascribe to malice that which can be adequately explained by stupidity.
Adam Nace
Ranch Hand
Joined: Jul 17, 2006
Posts: 117
posted
0
Why not just use the sun java development kit, instead of the Microsoft stuff? Its far more standard, and the code compiled with it can be run on pretty much any machine that has a jvm.
As Fred and Adam suggested, J++ is history, and you would do much better using Sun's current version of Java.
The Java Development Kit (JDK) can be downloaded from Sun's Java SE Download page. The most-recent version is "JDK 6 Update 2." After downloading, be sure to carefully follow the installation instructions (especially the step that updates the PATH).
For a good introductory book, I recommend Head First Java by Sierra and Bates.
Let us know how this goes.
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org
Ray Schaeffer
Greenhorn
Joined: Sep 10, 2007
Posts: 4
posted
0
Thank You Gentlemen,
I was able to download and install "JDK 6" and compile and run the HelloWorldApp.
I then copied a simple windows program, created with J++, and "javac" gave lots of errors. Will the "Heads First Java" book show how to write windows programs without MS language extensions being needed? Any pointers on how to do this would be much appreciated. Also ran across DrJava today, is it a usefull tool?
One important idea behind Java is "compile once, run anywhere." The concept is "platform independence" in terms of the same compiled bytecode being able to run on any machine (Windows, Mac, Linux, etc.) that has a Java Virtual Machine (JVM).
Dr. Java looked like a promising beginner's tool when I first saw it, but I think it has some significant shortcomings. For example, it ran extremely slowly, and I wasn't able to break out of an infinite loop using Ctrl+C (maybe there's another way?). For Windows, I would recommend an editor along the lines of crimsoneditor for syntax highlighting, line numbers, etc. Then compile and run using javac and java from the Command Prompt.
Once you get more comfortable with how these tools work, then you might consider moving to an IDE like Eclipse. [ September 11, 2007: Message edited by: marc weber ]
Adam Nace
Ranch Hand
Joined: Jul 17, 2006
Posts: 117
posted
0
Originally posted by Ray Schaeffer: Will the "Heads First Java" book show how to write windows programs without MS language extensions being needed?
I wonder if you are confusing "windows program" with "gui program", perhaps? Any java program will run in windows, if that is your objective. If you want to make a program that "looks like" a professional program, what you're talking about is GUI's, which java does just fine.
- Adam
Ray Schaeffer
Greenhorn
Joined: Sep 10, 2007
Posts: 4
posted
0
Perhaps my wording was not the best. What i want to do is write some code for some friends of mine who are not very computer savvy. A GUI for the operator interface would work better for them as opposed to a CLI (Command Line Interpretor) like DOS.
Since I had a copy of MS J++ hanging around, I installed that on WinXP and created a few "Console" projects. They all seemed to have a DOS/CLI operator interface. If a "Windows project" is created with J++, a GUI is created in the project -but- it gives the warning that it needs to include "MS Language Extensions". The warning says if you chose "No", your project may not compile! And if you choose "Yes", the "MS virtual machine for java" must be installed on your system.
What I'd like to deliver to my buddies, is some software that has a GUI, and where they don't have to be told that they need the "MS virtual machine for Java" installed on their system or any other oddball stuff, just plain old MS Windows.
I am very fearful that if they are told they must load something else on their systems, that they may quit buying me beer!
So the bottom line question is: How do i write Java software that has a GUI that will run on MS Windows systems without the user having to install any special libraries or other intimidating software.
Thanks
Adam Nace
Ranch Hand
Joined: Jul 17, 2006
Posts: 117
posted
0
You want to start looking into SWING. If you go to Google, and type in SWING Tutorial, you will get a link for the SWING tutorial hosted by Sun Microsystems. This gives you more than enough info to write a good GUI application.
Java applications require a Java runtime environment. The easiest place for users (non-developers) to get the Java runtime environment is probably java.com. The top of the page has a "Free Java Download" button. This should not be too intimidating to a user -- it's very similar to downloading a Flash player, for example.
Head First Java has 2 chapters devoted to GUIs, and another chapter on packaging and deployment. I think you'll find that Java has evolved a lot since the days of J++.
Also keep in mind that J++ is not Java. It was a Microsoft "implementation" of Java that failed to fully implement the Java Language Specification. J++ programs could only run on machines with a Microsoft Java Virtual Machine, which MS has been barred from distributing since 2001. (It can still be found on the internet, but it certainly isn't supported.) Also, because J++ was based on an ancient version of Java (1.1.x), its GUI capabilities were quite limited.
Ray Schaeffer
Greenhorn
Joined: Sep 10, 2007
Posts: 4
posted
0
Thanks a lot for the help! This forum has been pleasant, helpful and informative. Will order the book later today. -Ray Schaeffer