OS X Snow Leopard doesn't have Java 5, according to Netbeans build

View: New views
3 Messages — Rating Filter:   Alert me  

OS X Snow Leopard doesn't have Java 5, according to Netbeans build

by Sam Halliday :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

As the title suggests, OS X Snow Leopard doesn't have Java 5, according to Netbeans build.

I've set

  nbjdk.home=/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home

but I continue to get the error below. I can build if I set the permit.jdk6.builds property, but that seems like a hack, also I'm not sure what's happening with regards to the javac API which is always an issue. (I'm getting failures in contrib/javahints even from the command line due to javac API errors).

nbbuild/templates/projectized.xml:65: You are attempting to build NetBeans using JDK 6 (or higher).
This is forbidden as it may lead to accidental usage of JDK 6+ APIs.
Either run Ant with JDK 5, or set nbjdk.home=<JDK 5 home> in /Users/samuel/Documents/Java/NetBeans/release67/nbbuild/user.build.properties
(can be set from IDE by opening a module project's Properties dialog and picking the right Java Platform in Libraries).
You can alternatively set this property in /Users/samuel/.nbbuild.properties to affect all checkouts on this machine.
If you are sure you want to build with JDK 6+ anyway, use: -Dpermit.jdk6.builds=true

Re: OS X Snow Leopard doesn't have Java 5, according to Netbeans build

by Jesse Glick :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sam Halliday wrote:
> I can build if I set the
> permit.jdk6.builds property, but that seems like a hack

If you don't have a JDK 5 installation then certainly you need to use permit.jdk6.builds.


Re: OS X Snow Leopard doesn't have Java 5, according to Netbeans build

by Ralph Benjamin Ruijs-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> As the title suggests, OS X Snow Leopard doesn't have Java 5, according to
> Netbeans build.
>
> I've set
>
>  nbjdk.home=/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home

In snow leopard the java 1.5 is just a symlink to 1.6. On
http://www.nofluffjuststuff.com/blog/ken_sipe/2009/09/fixing_java_on_mac_snow_leopard
you can read how to fix java on snow leopard.