PDA

View Full Version : Stupid question?




zubairkhan14
Mar 19, 2006, 11:32 PM
I have taken 2 Java classes in highschool. One structured programming and one AP computer science. I always coded Java in the windows program JCreator (amazing program). Since unfortunately there is no JCreator for Mac, I am being forced to use Xcode. JCreator was basically made for Java so it was really easy to program in it. It had an option of selecting a new project to be an Application or an Applet but in Xcode there are like a thousand options under Java. What is the option to select if I wanna make an applet, and/or an application?

Thanks.



HiRez
Mar 20, 2006, 06:10 AM
Well, a lot of them that start with "Ant" use the Ant build system. If you don't know what that is, you probably won't be using it (although it's a good thing to learn and use). After that you have two choices for a Java Application and two choices for a Java Applet. Which you choose depends on what API you intend to use for the GUI. AWT uses heavyweight components native to the platform you're running on (like Frame), Swing uses lightweight pure Java components (like JFrame). Swing is the API of choice for most things nowadays, AWT was the original Java GUI model and AFAIK is rarely used today. Java Tool is for if you want to make a command-line (console) Java application with no user interface other than ASCII text, a backend data processing engine, or the like. A JNI (Java Native Interface) application lets you access platform-specific functionality, although at a loss of portability (although there are ways of doing JNI where other platforms can fall back on pure Java functionality). The Cocoa-Java application types let you use the Java language together with Apple's Cocoa APIs to give you direct access to Mac interface objects. I don't recommend going down this road since Objective-C is generally a much better way to use Cocoa and Apple no longer supports Cocoa-Java (although you can still use it).

Most likely you will be using one of these three, depending on what you want to do:

Java tool - text-based, command-line.
Java Swing Application - a double-clickable desktop application.
Java Swing Applet - a Java application that runs in a web browser (or Apple's Applet Viewer).

NOTE: It's been a few years since I've used Java, so someone please correct me if I'm wrong on something.

EDIT: I forgot to mention that there are other alternatives to using Xcode for Java on the Mac, such as NetBeans, Eclipse, JBuilder, IntelliJ IDEA, jEdit, SubEthaEdit, or the free TextWrangler. If you're doing simple projects in school I'd recommend staying away from the complexity of Xcode and try TextWrangler with Terminal for a bit.

jtalerico
Mar 20, 2006, 06:33 AM
It might seem cheesey but I use BlueJ on mac. It is not a powerful IDE but it allows me to put what i want instead of filling it in for me. I have also tried NetBeans but I am not a big fan.

zubairkhan14
Mar 20, 2006, 12:14 PM
Thanks a lot for your reply, HiRez,

I downloaded Eclipse and I find it to be more like JCreator than XCode is... Much simpler and easy to use. Now the only thing is I haven't programmed in a year and I want to start practicing again but don't know what to make... Any ideas on what I can do for practice?

jtalerico
Mar 20, 2006, 12:25 PM
Thanks a lot for your reply, HiRez,

I downloaded Eclipse and I find it to be more like JCreator than XCode is... Much simpler and easy to use. Now the only thing is I haven't programmed in a year and I want to start practicing again but don't know what to make... Any ideas on what I can do for practice?

Just think of something you like and try to make it better... I recently made a program that allows the user to FTP to their server, retrive a file.. Edit that file then FTP it back to the server. I know it seems silly (since you can just SSH) but my program puts a GUI front end onto it and it allows the user to save it on the local system too.

GFLPraxis
Mar 20, 2006, 12:38 PM
Try doing one of our four homework assignments from my CS 203 class. My final is on Wednesday, I just turned in assignment 3 (Robot Wars) on Saturday.

http://faculty.spokanefalls.edu/jmill/CS203Winter2006/CS203.html

simfonie
Mar 20, 2006, 01:28 PM
Wow, I am SO mad at my CS prof. I was in CS241 last semester and we did nothing of the sort -- ok, it was about Data Structures, but she could've thrown in a game project...