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

Fraaaa

macrumors 65816
Original poster
Mar 22, 2010
1,081
0
London, UK
I want to learn java and I've been suggested by a friend to use NetBeans; however, when I downloaded and ruined the NetBeans 6.9 gave me this message:

Cannot run on older version of Java 6 Standard Edition.
Please install Java 6 Standard Edition or newer or use --jdkhome switch to point to its installation directory.

But then when I go on java.sun.com to download Java SE doesn't give me OS X as platform to download.

Any help?
 

mrbash

macrumors 6502
Aug 10, 2008
251
1
Oracle does not produce a jvm or JDK for OS X. Apple does. If you have a core 2 duo or newer CPU you can get the Java 6 update for 10.5 from apple software update. Otherwise you have to get 10.6 for java6
 

wrldwzrd89

macrumors G5
Jun 6, 2003
12,110
77
Solon, OH
Also complicating matters is that, on 10.5, Java 6 is only available as a 64-bit Intel binary. This makes running anything that requires Java 6 that isn't itself 64-bit ready difficult.

EDIT: Due to the fact that NetBeans requires JDK 6 AND is not 64-bit ready, Snow Leopard is required to run it. However, the recently released Eclipse 3.6 (Helios) still runs with Java 5 or 6, AND is 64-bit ready, so it will run on Leopard or Snow Leopard (but not on Tiger or earlier).
 

Fraaaa

macrumors 65816
Original poster
Mar 22, 2010
1,081
0
London, UK
I downloaded the update 7 for 10.5, but I guess NetBeans is the problem; it kept gave me that message.

I downloaded Eclipse, is working and I'm fine with it; I just needed any compiler that works.

Thanks guys.
 

mrbash

macrumors 6502
Aug 10, 2008
251
1
Due to the fact that NetBeans requires JDK 6 AND is not 64-bit ready, Snow Leopard is required to run it. However, the recently released Eclipse 3.6 (Helios) still runs with Java 5 or 6, AND is 64-bit ready, so it will run on Leopard or Snow Leopard (but not on Tiger or earlier).

Netbeans runs on both 64bit and 32 bit JVMs and has been since inception since it is a 100% java program, unlike Eclipse. In fact Netbeans is available as a os independent download, something impossible for the Eclipse platform to produce. While the latest release, 6.9, requires Java6, the previous release 6.8 runs on Java5 and Java6.

Eclipse is available as a 64bit or 32bit, you have to choose which one you want to use.

I would encourage you to give Netbeans another chance, I greatly prefer it over Eclipse. It is a true integrated environment unlike Eclipse which is a series of editors and plug-ins.
 

wrldwzrd89

macrumors G5
Jun 6, 2003
12,110
77
Solon, OH
Netbeans runs on both 64bit and 32 bit JVMs and has been since inception since it is a 100% java program, unlike Eclipse. In fact Netbeans is available as a os independent download, something impossible for the Eclipse platform to produce. While the latest release, 6.9, requires Java6, the previous release 6.8 runs on Java5 and Java6.

Eclipse is available as a 64bit or 32bit, you have to choose which one you want to use.

I would encourage you to give Netbeans another chance, I greatly prefer it over Eclipse. It is a true integrated environment unlike Eclipse which is a series of editors and plug-ins.
Ah, I didn't know that about NetBeans. However... there are several things I really do not like about it:
  1. No mass source-code format option. Come on, Eclipse has had this for ages. Why the heck can't you format all source files in a package/project at once?
  2. No way I've found (yet) to bring up a list of compile errors and warnings in NetBeans 6.9, for all source files in the project/group. What's up with that?
  3. No way to specify native file location for libraries. Another feature Eclipse has that I happen to need.
 

mrbash

macrumors 6502
Aug 10, 2008
251
1
Ah, I didn't know that about NetBeans. However... there are several things I really do not like about it:
  1. No mass source-code format option. Come on, Eclipse has had this for ages. Why the heck can't you format all source files in a package/project at once?
  2. No way I've found (yet) to bring up a list of compile errors and warnings in NetBeans 6.9, for all source files in the project/group. What's up with that?
  3. No way to specify native file location for libraries. Another feature Eclipse has that I happen to need.

While this discussion is going outside the bounds of the original question, I do want to correct a few things here:

  1. Netbeans does not have code formating, but this solution is slated for inclusion in 7.0 (bug 25377). To be honest, its not a feature I need often. Our company has a very specific code style and everyone writes to that standard.
  2. All errors and warnings for a project are available in the "Tasks" panel. You can even create your own filters for this panel to see only those items you are interested in.
  3. Native library locations can be specified in the "run" ANT target definition for the project.
 

ValueArb

macrumors regular
Aug 7, 2010
118
129
It won't run for me

Doesn’t work for me. I have 1.6.0_20 and netbeans 6.9.1, running latest Snow Leopard (10.6.4). When I try to launch netbeans, it bounces in the dock a few times at launch, then quits without error message, even after updating the conf file as described by Alistair Dawson.
 

chown33

Moderator
Staff member
Aug 9, 2009
10,753
8,438
A sea of green
With any luck, error messages will be in the Console Messages window of Console.app.

In Finder, Go > Utilities > Console.app

Also, Alastair Dawson's comments are directed at running on 10.5.8. Trying to apply them on 10.6.4 may not work.
 

phatqao

macrumors member
Jul 20, 2010
50
0
PA and/or NYC
if all else fails, forego the IDE and use the text editor Smultron

compile in the terminal with
Code:
javac <filepath>
and run the class file with
Code:
java <class name>
 

1365281

Suspended
Oct 27, 2006
82
0
How to get rid of Java 5 and install Java 6, pls?

Hello,

I figured that my Leopard has "inherited" Java 5 during the transfer of my files from the old computer or it came preinstalled. Anyway, at present it is 1.5.0_26.
Have read many posts in the forums and decided to go for NetBeans 6.9 with which I need Java 6.
Also came across some mentions that in order to delete/reinstall Java platform the entire OS should be reinstalled. Would that be true? What would be the best way for me to proceed, pls?
 

chown33

Moderator
Staff member
Aug 9, 2009
10,753
8,438
A sea of green
Step 1: Identify your machine. Is it PPC or Intel-based? 32-bit or 64-bit?
This information can be obtained by choosing "About This Mac" from the Apple menu and copy/paste the Processor identity from the dialog window into a reply posted here.

Step 2: Run Java Preferences.app (it's located in your Utilities folder, possibly under the Java sub-folder). Choose the General tab if it isn't chosen. Does it list an available Java 6 or not, in the list inside the Java Applications section?

Once you've provided the above information, the next steps can be determined.


Also came across some mentions that in order to delete/reinstall Java platform the entire OS should be reinstalled. Would that be true?
Yes, that's one way. Where did you read these mentions?

Another way is to do a backup before installing a Java update, then you can go back to it without a full reinstall. That's how I usually do it.
 

1365281

Suspended
Oct 27, 2006
82
0
Hello,

I figured that my Leopard has "inherited" Java 5 during the transfer of my files from the old computer or it came preinstalled. Anyway, at present it is 1.5.0_26.
Have read many posts in the forums and decided to go for NetBeans 6.9 with which I need Java 6.
Also came across some mentions that in order to delete/reinstall Java platform the entire OS should be reinstalled. Would that be true? What would be the best way for me to proceed, pls?
Alright, got it on my own :)
 

wrldwzrd89

macrumors G5
Jun 6, 2003
12,110
77
Solon, OH
Hello,

I figured that my Leopard has "inherited" Java 5 during the transfer of my files from the old computer or it came preinstalled. Anyway, at present it is 1.5.0_26.
Have read many posts in the forums and decided to go for NetBeans 6.9 with which I need Java 6.
Also came across some mentions that in order to delete/reinstall Java platform the entire OS should be reinstalled. Would that be true? What would be the best way for me to proceed, pls?
You can also change the default. To do that, go to Java Preferences, in your Utilities folder.
 

1365281

Suspended
Oct 27, 2006
82
0
Step 1: Identify your machine. Is it PPC or Intel-based? 32-bit or 64-bit?
This information can be obtained by choosing "About This Mac" from the Apple menu and copy/paste the Processor identity from the dialog window into a reply posted here.

Step 2: Run Java Preferences.app (it's located in your Utilities folder, possibly under the Java sub-folder). Choose the General tab if it isn't chosen. Does it list an available Java 6 or not, in the list inside the Java Applications section?

Once you've provided the above information, the next steps can be determined.



Yes, that's one way. Where did you read these mentions?

Another way is to do a backup before installing a Java update, then you can go back to it without a full reinstall. That's how I usually do it.

Thank you!
I read in many forums by doing google search each time a question arose and this is how I came across this Java uninstallation issue.

I have a strong feeling that your info and the link posted by kreek in addition to all the info in this thread will solve it fully :)

I just need developper tools installed it seems to point Netbeans to Java 6 according to kreek's link.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.