When I create a new Java SE project with Ant in NetBeans, I see these two in 'project.properties', you must have these too:
javac.source=1.8 javac.target=1.8 Look in the Files window, in the 'nbproject' folder, to find 'project.properties' file. Gj On Mon, Jul 1, 2019 at 11:57 AM Peter Toye <netbe...@ptoye.com> wrote: > Dear Geertjan, > > To answer both your posts: > > I can't see any project option which corresponds to "source" or "target" > with a value including "6". Which option are you referring to, please? > > It's a straight Java app using Swing. Generated originally on NB version > <=8 (can't remember exactly which version - it was a long time ago) by the > usual method - select "Java application" and click "New | JFrame" - design > & program from there. > > HTH. > > Best regards, > > Peter > mailto:netbe...@ptoye.com > www.ptoye.com > > ------------------------- > Monday, July 1, 2019, 10:01:03 AM, you wrote: > > > And what kind of project are we talking about, can you give a lot more > details so we can help? > > Yes, it is Ant-based. But what kind of project type -- a NetBeans Platform > application? A Java EE application? An HTML/JavaScript application? What, > exactly? > > Gj > > On Mon, Jul 1, 2019 at 10:58 AM Geertjan Wielenga <geert...@apache.org> > wrote: > > Look in the Project Properties of your project (right-click it in the > Projects window and choose Properties). > > Gj > > On Mon, Jul 1, 2019 at 10:57 AM Peter Toye <netbe...@ptoye.com> wrote: > > I made a copy of a project in NB 8 and opened it in NB 11. Got some errors > which were resolved OK. > > But it won't build - I get a warning and 2 errors: > > warning: [options] bootstrap class path not set in conjunction with > -source 6 > ??error: Source option 6 is no longer supported. Use 7 or later. > ??error: Target option 6 is no longer supported. Use 7 or later.??BUILD > FAILED (total time: 0 seconds) > > I can't see any way of changing this as there aren't any project options > to change the source or target, even if I knew what they were referring to. > > Stackoverflow gives remedies for this, but only for Maven. This project > was built using Ant in NB 8 which I assume is carried over to NB 11. > > The only likely reference that I can see is in build-impl.xml which is > firmly marked "DO NOT EDIT"! But the comment implies that the properties > aren't being overridden correctly. > > <target depends="-pre-init,-init-private" name="-init-user"> > ?? <property file="${user.properties.file}"/> > ?? <!-- The two properties below are usually overridden --> > ?? <!-- by the active platform. Just a fallback. --> > ?? <property name="default.javac.source" value="1.6"/> > ?? <property name="default.javac.target" value="1.6"/> > ?? </target>?? > > Any ideas where to go from here please? > > Regards, > > Peter > mailto:netbe...@ptoye.com <netbe...@ptoye.com> > www.ptoye.com >