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

sixstorm

macrumors regular
Original poster
Jan 16, 2006
212
0
Nashville, TN
Hello again fellow programmers. I recently started a new semester and have COBOL, Java and C++ (Part 2). Even though I wish that XCode would work with COBOL, I know that it works with Java. However, when I try a simple Java program on XCode, it will not compile, giving some XML error. Maybe I just picked the wrong selection in "New Project" or "New File" but which one do I pick just to do a simple program? I know that it's supposed to make a .java and a .class, but none of those program types do it. I know I'm a n00b so I need some help please. Thanks in advance!
 

scan

macrumors 6502
Oct 24, 2005
344
0
Hello again fellow programmers. I recently started a new semester and have COBOL, Java and C++ (Part 2). Even though I wish that XCode would work with COBOL, I know that it works with Java. However, when I try a simple Java program on XCode, it will not compile, giving some XML error. Maybe I just picked the wrong selection in "New Project" or "New File" but which one do I pick just to do a simple program? I know that it's supposed to make a .java and a .class, but none of those program types do it. I know I'm a n00b so I need some help please. Thanks in advance!

I don't use XCode but I'm sure you'll have to download JDK, even if XCode has one, downloading the more recent one from Sun would be a good idea. Then check your paths
 

toddburch

macrumors 6502a
Dec 4, 2006
748
0
Katy, Texas
I just did this last night for the first time, and the first time in XCode too.

Under New Project, I picked Java>Java AWT Application, gave it a name, followed the bouncing balls, clicked build and go, and it worked.

What did you pick?

Todd
 

Eraserhead

macrumors G4
Nov 3, 2005
10,434
12,250
UK
XCode isn't great for Java, except as a text editor (where you compile with the command line.)
 

jeremy.king

macrumors 603
Jul 23, 2002
5,479
1
Holly Springs, NC
I don't use XCode but I'm sure you'll have to download JDK, even if XCode has one, downloading the more recent one from Sun would be a good idea. Then check your paths

It's not a good idea. Apple provides the JDKs for OS X, NOT SUN.

Maybe take Eraserhead's advice and don't use XCode. try Eclipse. It is by far my fav

I recommend a text editor with Terminal, but if (s)he must use an IDE, use one that doesn't get in the way of learning - like Netbeans BluJ
 

scan

macrumors 6502
Oct 24, 2005
344
0
It's not a good idea. Apple provides the JDKs for OS X, NOT SUN.



I recommend a text editor with Terminal, but if (s)he must use an IDE, use one that doesn't get in the way of learning - like Netbeans BluJ

learn something everyday. I never realized I didn't download jdk for my osx...
 

bousozoku

Moderator emeritus
Jun 25, 2002
15,716
1,891
Lard
I use XCode all the time for developing Java servlets. Nothing wrong with it.

b e n

How many first timers are developing servlets?

Other IDEs are much more helpful to someone starting. Xcode is a great environment for Objective-C but for everything else, it's less helpful.
 

lazydog

macrumors 6502a
Sep 3, 2005
709
6
Cramlington, UK
How many first timers are developing servlets?

I was commenting on Erasehead's statement which, imho is just plain wrong.

For somebody learning Java and working their way through the many console based examples XCode is more than adequate. For Java user interface stuff though I would agree, XCode is not much use.

I would have to disagree with your last comment though. XCode is far more than just an Objective-C development environment.

b e n
 

cblackburn

macrumors regular
Jul 5, 2005
158
0
London, UK
If you are getting XML based errors then I suspect that you chose to create an ANT based build which is not what you want. I guess that you either want AWT or Swing.

Chris
 

mbabauer

macrumors regular
Feb 14, 2006
105
0
Maybe take Eraserhead's advice and don't use XCode. try Eclipse. It is by far my fav

I'll third this one. I have played with XCode, but for money I am a Java developer. At home, I do all my Java development using Eclipse with the following plugins:
- JbossIDE - Jboss->Eclipse integration
- SpringIDE - Spring integration for Eclipse
- Maven Eclipse - Maven integration for Eclipse
- SubEclipse - Subversion version control for Eclipse

Eclispe is robust, has TONS of commercial and free plugins, and is geared towards Java development. Save the XCode for Cocoa and other more Mac-specific languages.
 

jsw

Moderator emeritus
Mar 16, 2004
22,910
44
Andover, MA
I'll third this one. I have played with XCode, but for money I am a Java developer. At home, I do all my Java development using Eclipse with the following plugins:
Agreed.

I do commercial software development - network management software - and my team uses Eclipse. It's not perfect, but it's an excellent development tool with a rich set of free plugins. I like some of the other free IDEs as well as some of the non-free ones, but Eclipse is my workhorse.

Xcode is a great OS X development tool, and it's getting even better for Leopard, but, for me, for Java, it can't touch Eclipse.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.