Java+Xcode+n00b = Confused

Discussion in 'Mac Programming' started by sixstorm, Jan 26, 2007.

  1. macrumors regular

    Joined:
    Jan 16, 2006
    Location:
    Nashville, TN
    #1
    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!
     
  2. macrumors 6502

    Joined:
    Oct 24, 2005
    #2
    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
     
  3. macrumors 6502a

    Joined:
    Dec 4, 2006
    Location:
    Katy, Texas
    #3
    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
     
  4. macrumors G4

    Eraserhead

    Joined:
    Nov 3, 2005
    Location:
    UK
    #4
    XCode isn't great for Java, except as a text editor (where you compile with the command line.)
     
  5. macrumors 6502

    Joined:
    Oct 24, 2005
    #5
    Maybe take Eraserhead's advice and don't use XCode. try Eclipse. It is by far my fav
     
  6. macrumors 603

    jeremy.king

    Joined:
    Jul 23, 2002
    Location:
    Fuquay Varina, NC
    #6
    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
     
  7. macrumors 6502

    Joined:
    Oct 24, 2005
    #7
    learn something everyday. I never realized I didn't download jdk for my osx...
     
  8. macrumors 6502a

    Joined:
    Sep 3, 2005
    Location:
    Cramlington, UK
    #8
    I use XCode all the time for developing Java servlets. Nothing wrong with it.

    b e n
     
  9. Moderator emeritus

    Joined:
    Jun 25, 2002
    Location:
    Gone but not forgotten.
    #9
    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.
     
  10. macrumors 603

    jeremy.king

    Joined:
    Jul 23, 2002
    Location:
    Fuquay Varina, NC
    #10
    You can still download it, just from Apple instead of Sun.

    http://developer.apple.com/java/
     
  11. macrumors 6502a

    Joined:
    Sep 3, 2005
    Location:
    Cramlington, UK
    #11
    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
     
  12. macrumors regular

    Joined:
    Jul 5, 2005
    Location:
    London, UK
    #12
    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
     
  13. macrumors 6502a

    Sayer

    Joined:
    Jan 4, 2002
    Location:
    Austin, TX
    #13
    Looks like Eclipse can support COBOL development (to some degree) on Mac OS X per this: http://developer.apple.com/tools/eclipse.html

    There are tons of plugins for COBOL in Eclipse, so who knows it may just work on Mac OS X.
     
  14. macrumors regular

    Joined:
    Feb 14, 2006
    #14
    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.
     
  15. jsw
    Moderator emeritus

    jsw

    Joined:
    Mar 16, 2004
    Location:
    Andover, MA
    #15
    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.
     

Share This Page