Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

zubairkhan14

macrumors newbie
Original poster
Mar 19, 2006
2
0
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

macrumors 603
Jan 6, 2004
6,265
2,629
Western US
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

macrumors 6502
Nov 23, 2005
358
0
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

macrumors newbie
Original poster
Mar 19, 2006
2
0
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

macrumors 6502
Nov 23, 2005
358
0
zubairkhan14 said:
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.
 

simfonie

macrumors newbie
Jan 25, 2004
4
0
Cs

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...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.