| View previous topic :: View next topic |
| Author |
Message |
sjandre
Joined: 28 Oct 2009 Posts: 2 Location: UK
|
Posted: Wed Oct 28, 2009 1:32 pm Post subject: NetBeans ME compiler cannot access java.lang.StringBuilder |
|
|
I'm just starting with NetBeans 6.7 having used Sun One Studio for several years.
I have many MIDP projects that run on Siemens' GSM modules, these were compiled on Sun One Studio using "Classic" compiler and a bootclasspath to runtime libraries for the module.
With the new NetBeans I have created a CLDC/MIDP project, and copied my existing source code and Ant scripts.
Attempting to compile generates the following message:
This version of java does not support the classic compiler; upgrading to modern
C:\java\work\Projects61\TC65_Midp\SmsIip\datatypes\MagArgDataType.java:101: cannot access java.lang.StringBuilder
class file for java.lang.StringBuilder not found
+ " Argument = " + Double.toString(arg) + "\r\n" ;
1 error
C:\java\work\Projects61\TC65_Midp\SmsIip\build.xml:86: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 0 seconds)
The runtime library for the device does not contain a StringBuilder class, string concatenation was done differently in earlier versions of Java.
Is there any way to use an old "Java 1.1" or "Classic" style compiler with NetBeans?
I never had any problems before with Sun One Studio.
I'd be grateful for any help
Best regards
Stephen |
|
| Back to top |
|
 |
sjandre
Joined: 28 Oct 2009 Posts: 2 Location: UK
|
Posted: Wed Oct 28, 2009 3:27 pm Post subject: NetBeans 6.7 / ME problem: java.lang.StringBuilder |
|
|
I have now found a solution to my problem posted earlier, so I am posting it here as it may benefit someone else.
The problem lay with the Ant script, there are now additional <source> and <target> elements that should be specified within <javac>.
These should have been set to 1.2 and 1.1 respectively. It is more efficient to use magic properties at the start of the Ant script:
<property name="ant.build.javac.source" value="1.2"/>
<property name="ant.build.javac.target" value="1.1"/>
This saves modifying each and every <javac> task.
Regards
Stephen |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
|
|