Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Feb 15, 2006, 01:57 AM   #1
CANEHDN
macrumors 6502a
 
CANEHDN's Avatar
 
Join Date: Dec 2005
Location: Sandy, UT
Java in XCode

I am currently a student studying programming and want to use my new iMac for programming in Java. I've looked at XCode a few times and it's kind of confusing. I currently use JCreator for windows and it's really easy to use. Is there any way to just make a new Java project without having to figure out which Java option to select. There are 6 different options to choose from and I'm not sure which one I should choose.

Last edited by CANEHDN; Feb 15, 2006 at 09:34 AM.
CANEHDN is offline   0 Reply With Quote
Old Feb 15, 2006, 02:07 AM   #2
bousozoku
Moderator emeritus
 
Join Date: Jun 2002
Location: Gone but not forgotten.
You might list the options since we might not know what they are.
bousozoku is offline   0 Reply With Quote
Old Feb 15, 2006, 02:22 AM   #3
CANEHDN
Thread Starter
macrumors 6502a
 
CANEHDN's Avatar
 
Join Date: Dec 2005
Location: Sandy, UT
Sorry. When I open JCreator it just opens a new page and lets you code. In XCode you have a plethera of options. The main ones I'm looking at using would be Java AWT Applet, Java AWT Application, JAVA JNI Application, Java Swing Applet, Java Swing Application, and Java Tool. I understand what AWT and Swing are but how do I know exactly which one to choose. Why can't I just open a new page and create code in Java like I can with JCreator.
__________________
:Macbook Pro 2.8GHz, 4GB RAM, 9600M GT 512MB VRAM
:Gaming- i7-2600K, GTX 570, Ripjaw 8GB RAM, SABERTOOTH P67, Thermaltake Element G
I support the MacRumors Blood Drive!
CANEHDN is offline   0 Reply With Quote
Old Feb 15, 2006, 04:03 AM   #4
HiRez
macrumors 601
 
HiRez's Avatar
 
Join Date: Jan 2004
Location: Western US
I think it mostly has to do with what environment you want the applications to run in and if you want some commonly-used things set up for you. To run in a browser, you would choose one of the Applet types, for a double-clickable application, choose one of the Application types. The project types basically just give you a skeleton to build from (windows, menus, etc.). For example, the Swing type sets up Swing menus and windows (JFrames), which the AWT type does the same with AWT components (Frame, etc.). If you don't want any of that set up for you, just choose the Java Tool type, where you'll do everything manually. I think that would be the closest to the traditional "blank Java project" that you're looking for (also would be used for creating command-line tools). But, this will give you a JAR file in the end, not a double-clickable application. You might want to just start by skipping Xcode and using a text editor and Terminal to compile and run. It won't manage a large project for you, but it's simpler than using Xcode.
__________________
Go outside, the graphics are amazing!
HiRez is offline   0 Reply With Quote
Old Feb 15, 2006, 05:06 AM   #5
bousozoku
Moderator emeritus
 
Join Date: Jun 2002
Location: Gone but not forgotten.
Java Tool is generally a blank application in Xcode. (Sorry, I thought that you were talking about the project types in JCreator, which I haven't seen.) The same goes for the various Tool projects for other languages--they're the simplest.
bousozoku is offline   0 Reply With Quote
Old Feb 15, 2006, 06:14 AM   #6
Eraserhead
macrumors G4
 
Eraserhead's Avatar
 
Join Date: Nov 2005
Location: UK
Classes?

If you are doing a basic java course aren't you just creating .class files??

Xcode is pretty good, I do it by creating a ANT-based application jar, but a java Tool seems to work too... and then xcode creates the directory structure...
once you click on those click on the Project Name.java file and then you can start coding (you may want to delete the contents, which display a Hello World message first...

As I get template files on my java course, I name the project after the main file and then replace it with the template in the /Project path/src/ directory...
and then add any addition files with Add to Project in the Project Menu...

The best thing about XCode is that you can re-indent the lines so you never have to organise your code (it gives you bad habits though)...
Eraserhead is offline   0 Reply With Quote
Old Feb 15, 2006, 06:33 AM   #7
jtalerico
macrumors 6502
 
Join Date: Nov 2005
If you want a bunch of crap with your tools try NetBeans...
__________________
iPhone4
17" MacBook Pro i7 500GB SSD
MacPro 2011
jtalerico is offline   0 Reply With Quote
Old Feb 15, 2006, 07:07 AM   #8
jalagl
macrumors 6502a
 
jalagl's Avatar
 
Join Date: Jun 2003
Location: Costa Rica
Send a message via ICQ to jalagl
Try Eclipse 3.1 or higher. It works great on OSX.

I couldn't stand XCode personally, but I know several people that like it.
jalagl is offline   0 Reply With Quote
Old Feb 15, 2006, 08:24 AM   #9
savar
macrumors 68000
 
savar's Avatar
 
Join Date: Jun 2003
Location: District of Columbia
Send a message via AIM to savar
Quote:
Originally Posted by CANEHDN
Sorry. When I open JCreator it just opens a new page and lets you code. In XCode you have a plethera of options. The main ones I'm looking at using would be Java AWT Applet, Java AWT Application, JAVA JNI Application, Java Swing Applet, Java Swing Application, and Java Tool. I understand what AWT and Swing are but how do I know exactly which one to choose. Why can't I just open a new page and create code in Java like I can with JCreator.
Because you're using an IDE, and its not designed for doing CS homework. I'd suggest that you not use XCode or JCreator to compile your assignments. You can always just create an empty .java file by itself and write your assignment into there and then compile it from Terminal. This is what I did in school mostly.

In most CS classes, by the way, you'd want to use the Java Tool template. In some cases you'd use Swing Application. I've never heard of writing Applets in CS classes, and I doubt anybody still teaches AWT.
__________________
Mehce
savar is offline   0 Reply With Quote
Old Feb 15, 2006, 09:32 AM   #10
CANEHDN
Thread Starter
macrumors 6502a
 
CANEHDN's Avatar
 
Join Date: Dec 2005
Location: Sandy, UT
I love using JCreator. One reason for that is probably because I started using it. I'll try using the Tool option and see what happens. I will also have to give Excplise a try. Thanks for the help guys.
__________________
:Macbook Pro 2.8GHz, 4GB RAM, 9600M GT 512MB VRAM
:Gaming- i7-2600K, GTX 570, Ripjaw 8GB RAM, SABERTOOTH P67, Thermaltake Element G
I support the MacRumors Blood Drive!
CANEHDN is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Xcode and java??? falconb Mac Programming 10 May 15, 2014 12:17 AM
Some apps prompt to install Java 6 even when Java 7 is installed MacMan988 OS X Mavericks (10.9) 1 Apr 18, 2014 07:56 AM
Java 6.x security risk (?) vs Java 7.x and broken apps w/ v7.x installs? mgiamo Mac Basics and Help 1 Dec 15, 2013 03:48 PM
XCode 5 DP and Java Problem aquethys Mac Programming 0 Aug 28, 2013 09:59 PM
Chrome on OS X -- Java plugin / Java 7 vs Java 6 Issue booyahbooyah Mac Applications and Mac App Store 4 May 31, 2013 09:13 AM

Forum Jump

All times are GMT -5. The time now is 05:12 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC