Skip to main content

setting up netbeans to compile to earlier versions of java

1 reply [Last post]
Joined: 2009-06-25

Hello all,

I'm writing a couple Xlets, and I'm new to NetBeans (I've programmed java for a few years now, but I've never ventured outside of JCreator or command line stuffs).

How do you set up NetBeans to compile to a previous version of java, say 1.3?
I'm using windows XP, NetBeans 6.5.1, and my JDK is version 1.6.0-13.

I've looked in the help file, and saw something about adding a line to the netbeans.conf file (sort of confused about what I need to add, if anyone can explain this it'd be much appreciated)
I've also tried setting up the project properties, under Build, Compiling, Addition Compiler Options - I put -target 1.3 -source 1.3, but that didn't seem to work.

I've tried to test this by using new features of java (i.e. enhanced for loop or methods added since 1.5 or later), I figure that would cause it not to build correctly.
I don't know how else to test this other than to load my xlet into a box and see if it runs, but that takes a bit too long.

Message was edited by: emfoote

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2009-06-25

Apparently I did not look hard enough:

"In this Project Properties dialog, if you select Sources there is an
combo box towards the bottom Source/Binary format which should allow you
to set the source level."


This worked.