My module requires JDK 6; how do I keep it from being loaded in JDK 5?
Add a line to your manifest, specifying which version of Java you need. E.g. to only run on JDK 6 and higher, not 5:
OpenIDE-Module-Java-Dependencies: Java > 1.6
Note that >
really means >=
, and that the traditional "internal" version numbers like "1.5", "1.6", etc. must be used despite the new Java naming scheme (JDK 5, JDK 6, …).
Requesting 5+ is pointless since no recent version of NetBeans runs on JDK 1.4 anyway.
There is also a syntax for requesting a particular version of the virtual machine (as opposed to Java platform APIs) but this is seldom if ever used.
By default, your module will depend on the same Java version as you specify for javac.source
,
i.e. the version of the Java language your module requires.
The NetBeans module development support permits you to pick a JDK to use for compiling (and running) a module or suite. Obviously you must specify a JDK at least as new as what your dependency requests; it is unwise to specify a newer JDK than that: you might accidentally use some newer APIs without realizing it, making your code not actually run on the declared minimum version.
Applies to: NetBeans 6.x
Platforms: all