java programming on a mac

Discussion in 'Mac Apps and Mac App Store' started by jefhatfield, Feb 4, 2003.

  1. jefhatfield Retired

    jefhatfield

    Joined:
    Jul 9, 2000
    #1
    i am in a java class and we are allowed to do the labs from home with any computer we choose...pentium 1 or better/windows 98 or better/ or a mac

    some have mentioned that programming in java on a mac is not as smooth as programming in java on windows?

    is that true?

    ps- keep the jargon down since i am a hardware techie and know close to nothing about programming and this will be my first class since pascal 20 years ago:p
     
  2. FattyMembrane macrumors 6502a

    FattyMembrane

    Joined:
    Apr 14, 2002
    Location:
    bat country
    #2
    i know very little about java programming on the mac, but depending on what type of programming you will be doing, the mac should work fine. there are actually 3rd party java IDEs available for osx but the dev tools includes everything you need. if you are just starting out doing command line java programming, the dev tools installs javac which works fine for me.
     
  3. richard5mith macrumors regular

    Joined:
    Jun 4, 2002
    #3
  4. kenkooler macrumors regular

    Joined:
    Jan 2, 2002
    Location:
    Mexico City
    #4
    Java programming is actually better on a Mac, use Java 1.4.1 from Apple's developer page.
     
  5. kay macrumors member

    Joined:
    Jan 26, 2002
    #5
    I study Computer Science at Carnegie Mellon University, which is ranked as the top school in the country for Computer Science along with MIT and Stanford. I do all my Java programming on my TiBook 800MHz with CodeWarrior 8.0 for Mac OS X.

    If you have any questions I'd be happy to help.
     
  6. TEG macrumors 604

    TEG

    Joined:
    Jan 21, 2002
    Location:
    Langley, Washington
    #6
    While I was studying JAVA at College, I just used vi, TextEdit, and Apple Works. Compiled the files in the terminal, and ran it from the command line.... It works great, and doesn't try to rewrite your OS like JDK does in Windows, or JDE in OS9.

    TEG
     
  7. Adurbe macrumors member

    Joined:
    Jan 22, 2003
    Location:
    Wales
    #7
    I am also a compsci student, we were started off on "BlueJ" its a nice simple editer that loads a LOT quicker than codeworrior and unless you are the level where 1.4.1 makes a difference I wouldn't bother as it is a beta remember....
     
  8. Taft macrumors 65816

    Taft

    Joined:
    Jan 31, 2002
    Location:
    Chicago
    #8
    Personally, I find Unix systems have a SLIGHT advantage over Windows systems for Java programming simply because paths and environment variables and script always seem to make more sense on Unix.

    That being said, OS X kinda blows some of that advantage because it uses some non-standard paths for Java. For instance the JVM (the program that runs your Java code) is located in /System/Library/Frameworks/etc/etc/etc... way down in your System folder and is linked to in the /usr/bin directory. This creates some rather non-standard situations when configuring some IDE's or running some Java programs.

    So I would say that its almost a wash as far as ease of use goes. For me, it boils down to: I like Unix, so I prefer Java programming on my Mac.

    Taft

    PS- in regards to the path business above...you should almost always use /usr as the path to your Java home directory. This is different than most Unix's so don't get thrown off by information given to users of other Unix's and Windows.
     
  9. jefhatfield thread starter Retired

    jefhatfield

    Joined:
    Jul 9, 2000
    #9
    thanks for the help !!

    we were at 1.3.1 last semester but now the teacher said we will use 1.4.1
     
  10. bousozoku Moderator emeritus

    Joined:
    Jun 25, 2002
    Location:
    Gone but not forgotten.
    #10
    I've been using the jGrasp IDE from University of Auburn and it works equally well on Mac OS X as it does on the Windows machines at school. I'm on my 2nd Java course now and I've only had one problem and it concerned someone else's source code which would compile on Windows but not on Mac OS X.

    The only real drawback is that JDK 1.4.1 isn't finished for Macintosh.

    If you read Java Developer's Journal, you'll see that they're quite pleased with Java programming on Macintosh too.
     
  11. ibookin' macrumors 65816

    ibookin'

    Joined:
    Jul 7, 2002
    Location:
    Los Angeles, CA
    #11
    I am also a computer science student and I have some advice as well. For my programming classes, we have to use an application called JBuilder, which is availible for OS X. Not only is it insanely slow, but the PC version does not read projects created on the Mac properly, so I have to go through an insane conversion process to give the projects to my PC-using professors (make new project on PC, add files created on Mac) or use the PC version on my Athlon (ugh!). I have Project Builder from the Dev. Tools and it is much better than JBuilder, but the projects do not work with JBuilder, and javac does not work with packages for some reason.

    So the gist is: Stay away from JBuilder!
     
  12. moby1 macrumors 6502

    Joined:
    Jan 28, 2002
    Location:
    Sunny San Diego
    #12
    Editing $CLASSPATH

    I am just starting out on Java. I know I need to edit my path so I can compile, run programs. How do I edit my $CLASSPATH?

    My programs are in:

    computername/Users/username/Documents/CIS/JavaJive/Programs
     
  13. benjaminpg macrumors regular

    Joined:
    Apr 21, 2002
    Location:
    Salt Lake City, UT
    #13
    At school, I am in a java class as well, using windows, unfortunately. I prefer using the mac to do command-line work. It just seems more streamlined using project builder, etc.

    Now that we are starting GUI, I still prefer coding on the mac. But, as you will soon discover, if you have not already, it takes a fair amount of work to make a Java application follow the aqua guidelines. Obviously, it is a personal choice whether to follow the guidelines, but I like the result much better.

    I find that I like the look of my programs on Windows better than on the Mac. This is because on the mac, button sizes, etc. are standardized, and anything that goes against the standard looks out of place. On windows, on the other hand, there are very few guidelines, so a 40 pixel by 40 pixel button doesn't look that out of place.

    I would still strongly suggest using the mac, because of its ease of use, compared to windows. But that should be fairly obvious since you are on the MacRumors forums.
     
  14. peterjhill macrumors 65816

    peterjhill

    Joined:
    Apr 25, 2002
    Location:
    Seattle, WA
    #14
    Sweet, I am a Network Engineer at CMU. I am taking 15-112 this semester, and yes, Java programming on a Mac is pretty nice. Let's compare, Microsoft is fighting to keep Java from needing to be bundled with the OS. Apple has paid to develop their own compiler and have included it in their OS for a long time.

    ps. i have a ti800 also. very nice.
     
  15. moby1 macrumors 6502

    Joined:
    Jan 28, 2002
    Location:
    Sunny San Diego
    #15
    Re: Editing $CLASSPATH

    Well, I'll answer my own question for the benefit of others. Here's what worked for me;

    vi ~/.cshrc

    This creates a new file if it doesn't exist, and then add this line ('i' will get you to 'insert' mode in vi);

    setenv CLASSPATH /User/username/Documents/JavaStuff

    Then press esc key (to escape insert mode) and type :wq (write, quit) to save file.

    Now, log out and log back in. Type;

    echo $CLASSPATH

    to confirm the setting.

    Hope somebody finds this usefull.

    moby1
     
  16. brainless macrumors member

    Joined:
    Oct 10, 2001
    #16

    Well, this might be true for J2SE and to some extent for J2EE, but definitely not for J2ME (which is starting to be big with dozens of new phones being sold by milions). I've heard about a guy who wrote his own replacement for the preverifier, so it is probably technically possible to develop J2ME on the Mac, but it is extremly inconvenient. I haven't heard about the Java Wireless Toolkit for the Mac. Does naybody know about Apple activities in this area ? Is there a way how to lobby them to support J2ME ? Take my vote for granted.
     
  17. Akira macrumors member

    Joined:
    Sep 18, 2002
    Location:
    The Netherlands
    #17
    I'm currently making some simple programs to calculate e and pi in java, and it's really simple!
    A year ago I needed to learn java at school, on some crappy Fujitsu/Siemens pentium school computers, and it didn't work at all, we often had to switch computers because the SDK's were f*cked up. Now I'm typing sources with BBEdit Lite, and compiling them by typing "javac <sourcefile>" in the Terminal.

    It's just TOO easy :p
     
  18. szark macrumors 68030

    szark

    Joined:
    May 14, 2002
    Location:
    Arid-Zone-A
    #18
    Sorry to hear that you have so many problems with it. I happen to like JBuilder, it is slow (since it is completely Java-based itself) but very full-featured.

    I haven't ever tried moving projects from the Mac to the PC -- I'll have to see if I have the same issues. I was able to move projects from PC to Mac with no problems, though.
     
  19. Taft macrumors 65816

    Taft

    Joined:
    Jan 31, 2002
    Location:
    Chicago
    #19
    You might be in a pickle, then. The 1.4.1 version for OS X is only in beta and I've had some problems with it. For example some IDE's and programs need to be specially configured after installing 1.4.1. IntelliJ's IDEA and Tomcat are two good examples.

    But on the other hand, not much has really changed between 1.3 and 1.4. The major difference outside some JVM improvements is the inclusion of libraries that used to be part of external and third party libraries. If you don't use those libraries 1.3.1 and 1.4.1 are almost perfectly interchangable. So chances are that unless you guys are doing Tomcat, XML or some other more advanced topic in your beginning Java class, you can probably use 1.3.1 with no problems.

    If I were you, I'd stick with 1.3.1 until I ran into something that wouldn't work. Chances are, you'll be able to use it for the whole class. And maybe Apple will get its rear in gear and release the final version and it will be compatible with other 1.4.1 programs on the market.

    Taft
     
  20. Taft macrumors 65816

    Taft

    Joined:
    Jan 31, 2002
    Location:
    Chicago
    #20
    If you like JBuilder, you should give a IDEA a shot (www.intellij.com). It is a WAY better IDE and handles some really cool things like refactoring. And its way faster than JBuilder.

    The only downside is that it doesn't have an interface builder. But if you aren't working with GUI's, you don't need to worry about it. Plus, how many times have you had to hack the GUI code that JBuilder generates anyway. I had to hack the code a lot when I was using it.

    Taft
     
  21. bousozoku Moderator emeritus

    Joined:
    Jun 25, 2002
    Location:
    Gone but not forgotten.
    #21
    I'm surprised that anyone else is using CodeWarrior but it is a lot less complicated than anything else for GUI Java programming. I just wish it was so simple for GUI C++ or C programming.
     
  22. jaykk macrumors 6502a

    Joined:
    Jan 5, 2002
    Location:
    CA
    #22
    JBuilder doesn't work at all in my mac

    JBuilder never worked for me on Mac OS X. May be its because i upgraded JVM to 4.1.

    If it is that slow, i dont want to even try. I like ProjectBuilder a lot, why can't apple improve a little bit, like exporting/importing jar files etc.

    i heard that Oracle's JDeveloper is available for OS X too.. did anyone play with that?
     
  23. szark macrumors 68030

    szark

    Joined:
    May 14, 2002
    Location:
    Arid-Zone-A
    #23
    I'll have to look into that.

    I've never really used the interface builder in JBuilder. I have done quite a bit of GUI programming in xview :eek: so I didn't have a problem coding the GUI manually.
     
  24. brainless macrumors member

    Joined:
    Oct 10, 2001
    #24
    Seems like nobody has any information concerning J2ME development on the Mac OS X. Will we see 2 Sun Wireless Toolkit funning on the top of it ?
     

Share This Page