Having trouble and looking for a heads-up. I have an enum causing
problems in NB 6.0 and the error is:
enums are not supported in -source 1.3 (use a -source 1.5 or higher)
etc etc
I've looked all over and can't find the compiler options. I also don't
understand why it would try to use 1.3 since I've never had that
installed (this is a fresh 6.0 install with JDK1.5). I checked
netbeans.conf and it shows:
netbeans_jdkhome="C:\Program Files\Java\jdk1.5.0_14"
So.. no idea where 1.3 is coming from and I'm out of ideas.
Thanks in advance!
> Having trouble and looking for a heads-up. I have an enum causing
> problems in NB 6.0 and the error is:
>
> enums are not supported in -source 1.3 (use a -source 1.5 or higher)
Dunno. My brand new download of NB 6 supports enums just fine (I just
checked.)
Check Tools->Java Platforms, make sure you are using a recent JDK by
default.
You can right click on your project in the Projects view, select
Properties->Build->Compiling and put "-source 1.5" as an argument for
that project, but I'm not sure what the global command for that would be.
Check your actual environment too, make sure you don't have any stray
environment variable floating around. I don't know if Java does this
but the old unix command line tools would look at the environment for
default options for the compiler and linker, javac might be doing the same.
Kevin Bagust - 11 Dec 2007 00:34 GMT
>> Having trouble and looking for a heads-up. I have an enum causing
>> problems in NB 6.0 and the error is:
[quoted text clipped - 10 lines]
> Properties->Build->Compiling and put "-source 1.5" as an argument for
> that project, but I'm not sure what the global command for that would be.
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.
Kevin.
znelson - 11 Dec 2007 00:46 GMT
Thanks Mark/Kevin,
I must have a whacked version of NB6.0 because I don't have an option
to set compiler options under the Build->Compiling section. I also
don't have a combobox under the Sources Filtering or Libraries &
Resources. My project is J2ME but that shouldn't hide the compiler
options.
I took a look at build-impl.xml and it had javac.source set to 1.3
(somehow). I changed it to 1.5 but the project still won't compile
(same error).
Mark Space - 11 Dec 2007 01:44 GMT
> I must have a whacked version of NB6.0 because I don't have an option
> to set compiler options under the Build->Compiling section. I also
> don't have a combobox under the Sources Filtering or Libraries &
> Resources. My project is J2ME but that shouldn't hide the compiler
> options.
Isn't J2ME restricted to Java 1.1? I thought it was...
Make a new project that's just a regular application, then check the
options settings. That they don't appear in this project might be
related to it being J2ME.
znelson - 11 Dec 2007 01:50 GMT
ouch, that would be painful. the thought crossed my mind though. no
enums in j2me eeeeek!
I'm reinstalling and crossing fingers. Thanks Mark!
> Having trouble and looking for a heads-up. I have an enum causing
> problems in NB 6.0 and the error is:
[quoted text clipped - 3 lines]
>
> I've looked all over and can't find the compiler options.
Clearly not *all* over. :)
> I also don't understand why it would try to use 1.3 since I've never had that
> installed (this is a fresh 6.0 install with JDK1.5). I checked
> netbeans.conf and it shows:
>
> netbeans_jdkhome="C:\Program Files\Java\jdk1.5.0_14"
This tells NetBeans what JDK to use for itself, not necessarily for each project.
> So.. no idea where 1.3 is coming from and I'm out of ideas.
Take a look at the project properties dialog, particularly the headings
"Sources" - "Source / _B_inary Format:"
"Libraries" - "Java Platform" (you might need the _M_anage Platforms..."
button, but probably not this time).

Signature
Lew
znelson - 11 Dec 2007 02:43 GMT
Hi Lew,
I don't think my menu options are configured the way a non-J2ME
project would be. When I go to project properties I have:
General
Platform
Abilities
Application Descriptor
Build
Sources Filtering
Compiling (looked here)
Libraries & Resources (here too)
Obfuscating (I feel like I am)
Creating Jar
Signing
Generatoring Javadoc
Running
Deploying
I've completely uninstalled/reinstalled everything-java. I'm running
NetBeans 6.0, Wireless Toolkit 2.5.2, and Java 1.6
Lew - 11 Dec 2007 02:48 GMT
> Hi Lew,
>
[quoted text clipped - 18 lines]
> I've completely uninstalled/reinstalled everything-java. I'm running
> NetBeans 6.0, Wireless Toolkit 2.5.2, and Java 1.6
Ah. I hadn't spotted that you were using JME when I answered.

Signature
Lew