Help me to debug build error

N

NickName

Hi java gurus,

I'm a java newbie. Attempted to use JBuilder (2005) from Borland to
rebuild a jar file. It seems that the jar file has four core classes.
Rebuild failed. Yes, I've captured err msg and have requested
assistance from Borland.

In the meantime, I'm attempting to rebuild each class and to see
(possibly learn something out of it) how it works.

And here's the err msg generated upon rebuiding the FileInfo.java
class:
"FileInfo.java": cannot access java.lang.StringBuilder;
java.lang.StringBuilder at line 13, column 58
"FileInfo.java": Internal error: stack sim error on

public String toString() {

return caliberId + " - " + title + " @ " + location;

} at line 12, column 34

What exactly is it saying? Java installation not found? ???? Do you
need some additional info/bg info?

TIA.
 
M

Mike Schilling

NickName said:
Hi java gurus,

I'm a java newbie. Attempted to use JBuilder (2005) from Borland to
rebuild a jar file. It seems that the jar file has four core
classes. Rebuild failed. Yes, I've captured err msg and have
requested assistance from Borland.

In the meantime, I'm attempting to rebuild each class and to see
(possibly learn something out of it) how it works.

And here's the err msg generated upon rebuiding the FileInfo.java
class:
"FileInfo.java": cannot access java.lang.StringBuilder;
java.lang.StringBuilder at line 13, column 58
"FileInfo.java": Internal error: stack sim error on

public String toString() {

return caliberId + " - " + title + " @ " + location;

} at line 12, column 34

What exactly is it saying? Java installation not found? ???? Do
you need some additional info/bg info?


1.5 java compilers implicitly rewrites that line as (more or less)

return new
StringBuilder(),append(caliberId).append("-").append(title).append(" @
").append(location);

since this is far more effiicient that constructing three intermediate
String objects. Since StringBuilder was introduced in 1.5, earlier java
compilers would do the same using StringBuffer. Perhaps your JBuilder
installation is somehow confused, so that it's using a 1.5 compiler that is
pointed at a 1.4 version of the java runtime?
 
N

NickName

Mike said:
NickName wrote:
OP ommitted.
1.5 java compilers implicitly rewrites that line as (more or less)

return new
StringBuilder(),append(caliberId).append("-").append(title).append(" @
").append(location);

since this is far more effiicient that constructing three intermediate
String objects. Since StringBuilder was introduced in 1.5, earlier java
compilers would do the same using StringBuffer. Perhaps your JBuilder
installation is somehow confused, so that it's using a 1.5 compiler that is
pointed at a 1.4 version of the java runtime?

Ok, so, I took a look at current setting for compiler etc. Here's my
finding.

The version of JBuilder on my box is JBuilder 2005 Enterprise

Compiler: Borland Make
Language Features: Java 2 SDK, v5.0 (generics enabled)
Target VM: Java 2 SDK, v5.0 and later

* Compiler has another option for Borland Make (JBuilder 8), with this
option selected, it produced similar err msg.

* Source code was written/built in 2004.

Many thanks.
 
S

Sebowsky

Hey guys!
Found your forum while searching for the same problem you are
discussing here.
The error is fixed with the latest j2me patch (patch 200511).

Thanks and happy coding!
Sebo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top