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

damgpro

macrumors member
Original poster
Aug 25, 2004
34
0
nyc
Hey I'm a computer science major and I've just started my programming 1 course and we're using Java. My professor wants us to be using JDK 5, what JDK is with XCode? If it isn't 5 is it compatible?

Thanks!
 

jamdr

macrumors 6502a
Jul 20, 2003
659
0
Bay Area
Apple has decided to release Java 5 along with OS X Tiger, and not before for some reason. So the Java version that comes pre-installed on Macs with Panther is 1.4.2. I've heard that the Java 5 beta that comes with OS X Tiger beta will work just fine on Panther, though, if it's that important and you want to try to get your hands on it.
 

damgpro

macrumors member
Original poster
Aug 25, 2004
34
0
nyc
Thanks for the info jamdr, guess I'll have to do the work on my PC for class :(
 

cluthz

macrumors 68040
Jun 15, 2004
3,118
4
Norway
Yeah it sucks!

Java 1.5/5.0 has been available for Win and linux/x86 for 6 months...
I have to use java 5.0, so have to compile and run my apps on a crappy P3/400MHz machine (from Remote dektop on my powerbook...).

Apple is really shutting out java developers!

I mailed apple developer connections about Java 1.5/5.0 progress, but since I "only" have the $100 student account and not the $500 regular account they wouldn't discuss it. They said it isn't their policy to talk about unreleased programs!

I actually bought my powerbook because I needed a portable java production machine. What a waste!
 

iJed

macrumors 6502
Sep 4, 2001
264
10
West Sussex, UK
damgpro said:
Thanks for the info jamdr, guess I'll have to do the work on my PC for class :(

If you write your code under Java SDK 1.4 on Mac OS X there should be no problem getting it to compile with Java 5. However the older version of the language lacks some of the features of the new version but this will probably not matter for an introductory programming course.

I really wish that Apple would hurry up and release Java 5 for Mac OS X. The delay before every major Java release on the Mac must be causing people to not consider buying Macs. Fortunately for Apple it will take developers quite a while to move to the new version since the installed base is still so small. At work I've just started a new Java project using SDK 1.4 and SWT. I won't consider Java 5 until its supported properly in SWT, and even then, I'm not a big fan of many of the new features. Although generics and no typecasting are great.
 

stoid

macrumors 601
iJed said:
If you write your code under Java SDK 1.4 on Mac OS X there should be no problem getting it to compile with Java 5. However the older version of the language lacks some of the features of the new version but this will probably not matter for an introductory programming course.

Actually, you may run into problems. I've heard/read that Jave 1.5/5.0 simplified File IO so no more BufferedReader(new FileReader(File)), just a single level that accesses the file.

As for basic Java development on the Mac, I have found XCode to be like shooting a nuke to kill a fly. For basic Java dev, I would use Eclipse, and for simpe coding take a look at BlueJ. They should both come up if you search for them over at versiontracker or MacUpdate.
 

cluthz

macrumors 68040
Jun 15, 2004
3,118
4
Norway
There's acutally many new features that makes Java 5.0 much easier and better than the 1.4.2.
Things like automatic boxing and unboxing makes a huge difference.
Also the new Scanner class is making reading input from a terminal/xterm much easier, this is very important for learning java. The tables are much better too. Static import (oh yeah! never have to type System.out.println...), enum.. etc...
There are many things that makes java much easier to learn, therefore many programming classes have switched to java 5.0.

Also Mac is the only large platform that doesn't have java 5.0..
 

ChrisBrightwell

macrumors 68020
Apr 5, 2004
2,294
0
Huntsville, AL
damgpro said:
Thanks for the info jamdr, guess I'll have to do the work on my PC for class :(
What are you using that's specific to Java 5? If you're just doing an intro-level course, I doubt there's anything you'd do in 1.4.2 that won't work (or works differently) in 5.

If nothing else, you can use the Apple tools and copy them over to your PC to make sure that they build w/ Java 5. You could also setup a Virtual PC w/ Windows 2000 and test your code that way.

HTH.
 

damgpro

macrumors member
Original poster
Aug 25, 2004
34
0
nyc
Thanks for all the suggestions everyone. I'm prolly going to do as ChrisBrightwell stated and write the code on my mac and then compile it on the PC, or perhaps through Virtual PC or remote desktop connection. I found out that the main reason for using Java JDK 5 in my class was for the new scanner class that cluthz mentioned.

Thanks again!
 

iJed

macrumors 6502
Sep 4, 2001
264
10
West Sussex, UK
stoid said:
Actually, you may run into problems. I've heard/read that Jave 1.5/5.0 simplified File IO so no more BufferedReader(new FileReader(File)), just a single level that accesses the file.

As for basic Java development on the Mac, I have found XCode to be like shooting a nuke to kill a fly. For basic Java dev, I would use Eclipse, and for simpe coding take a look at BlueJ. They should both come up if you search for them over at versiontracker or MacUpdate.


BufferedReader/BufferedWriter and FileReader/FileWriter are both still there and have no sign of being deprecated. There would be simply no reason to remove these extremely useful classes.

I find Eclipse to be a much better Java editor than Xcode is. Hopefully Apple is going to make Java a firstclass language with Xcode 2, because just now Xcode is really for C/C++ and Obj-C.
 

cluthz

macrumors 68040
Jun 15, 2004
3,118
4
Norway
iJed said:
BufferedReader/BufferedWriter and FileReader/FileWriter are both still there and have no sign of being deprecated. There would be simply no reason to remove these extremely useful classes.

I find Eclipse to be a much better Java editor than Xcode is. Hopefully Apple is going to make Java a firstclass language with Xcode 2, because just now Xcode is really for C/C++ and Obj-C.

BufferedReader isn't removed, but Scanner will make some things much easier than Buffered reader did.
 

MacFan26

macrumors 65816
Jan 8, 2003
1,219
1
San Francisco, California
iJed said:
I find Eclipse to be a much better Java editor than Xcode is. Hopefully Apple is going to make Java a firstclass language with Xcode 2, because just now Xcode is really for C/C++ and Obj-C.
Oh yeah, definitely Eclipse. I'd even recommend it over NetBeans, which I used to like a lot better. Eclipse isn't the most friendly app, but it's pretty much the same when going back between Mac and PC, which is nice in a school environment where the labs only have PCs...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.