Download links broken
Anyone know a mirror?
http://java.sun.com/j2se/1.4.2/download-netbeans.html
Thanks
Download links broken
Anyone know a mirror?
http://java.sun.com/j2se/1.4.2/download-netbeans.html
Thanks
Why do you want to download a 6+ years old JDK with an IDE that is probably of the same age? For development I’d recommend the latest SDK version 6u1 and the latest Netbeans IDE (6.0M9) or Eclipse (3.3RC1) or IDEA (7M1). If you want for some reason to test against that ancient version, use the JRE. Please notice that the JRE version bundled with Netbeans isn’t the latest patch level and it might be vulnerable. I wouldn’t recommend to install it.
I want to create applets compatible with 1.4.2. Can I use the newest NetBeans/SDK and specify the applet is for 1.4.2, or do I have to use an old NetBeans/SDK designed for 1.4.2? Thanks.
At any rate, the downloads are still down.
When compiling your Java code, you can specify the target version. So, you can use Java 6 to develop applets compatible with 1.4.2 if you are careful and if you don’t use API calls that are marked with “@since 1.5” or “@since 1.6”. Intellij IDEA automatically raises warnings in such cases but I think other Java IDEs aren’t clever enough.
You can even develop using the syntax introduced with Java 5 and then use Retrotranslator to fix the class files.
I’d however go for Java 6 (preferable Consumer JRE edition) and hope that by the time I’m ready, there are enough users that have the current Java version installed. According to Adobe (who publishes distribution statistics for Flash - 98% overall, 85% latest version)) 85% of all browsers have Java installed but they don’t tell you the version. AFAIK there are no other statistics available from Sun.
Thank you very much, sma! That was very informative, and I didn’t even think of that. You’re right, I should go for Java 6 and hope by the time I’m ready most people have upgraded. 
You can certainly do this with Eclipse. The Java/Compiler preference pane allows a compiler compliance level to be specified (1.3, 1.4, 5.0 or 6.0). You can also set it on a per-project basis (Right click on project, Properties/Java Compiler)
The autocomplete will not offer classes and methods that do not exist in the specified version, in addition to the expected “class not found errors” that you get if you go ahead and try and use them anyway.
Can you get Eclipse to warn about using libs that are declared @since some version after you’ve set compatibility to? Would like this feature because I’ve tripped over it a few times (as I compile for 1.4 but using 6.0)
Cas 
Hmmm, I may have spoken too soon. Just tried to use System.nanoTime() in a project set to 1.3 source compatibility, and no errors were raised. :-[
Move along now, nothing to see here…
Hmm. Did you also set it to compile to 1.3?
I only ask because I’m sure I’ve seen the exact behaviour you described from eclipse (refusing to autocomplete things, but also doing it’s little error/warning squiggles under things that were @since the later stuff), so I’m wondering if it’s a minor quirk of the proejct settings in your case?
I think I did. Had another go and the .settings/org.eclipse.jdt.core.prefs for the project looks like this
#Wed May 30 12:41:26 BST 2007
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.1
org.eclipse.jdt.core.compiler.codegen.unusedLocal=optimize out
org.eclipse.jdt.core.compiler.compliance=1.3
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=ignore
org.eclipse.jdt.core.compiler.problem.enumIdentifier=ignore
org.eclipse.jdt.core.compiler.source=1.3
Have I missed something?
Can’t you just reference the 1.4 JRE system library in your project’s Java Build Path -> Libraries ?
Yeah, that’s the proper way to do it.
It’d just be nice not have to bother having multiple JDKs. All the information needed is there in the form of @since tags, Eclipse just needs to take notice.
Well the since-tags are missing very often :-/
lg Clemens
About time they ran a little tool on their JDKs and automated the generation of @since tags isn’t it…
Cas 
aren’t since tags Object level annotations?
i.e. wouldn’t you still be able to use methods which where introduced later? (provided the class was introduced earlier)
Nah, just Javadoc annotations I thought. Maybe that’s the problem. But then, Eclipse manages to pick up deprecated tags OK.
Cas 
fwiw, I wouldn’t trust my work’s compatibility to (optional) javadoc tags and the IDE’s ability to somehow behave consistently with those, and I’ll just keep having multiple JDK’s on my system and have eclipse point to the targetted JDK. I have to test on the targetted JRE anyway and as a developer I think having multiple JDK’s on my system just ‘comes with the territory’.
An added plus is that I’m also sure the JRE javadoc is from the version I’m targetting, so I’ll prevent possible confusion there too.