Thread View: borland.public.jbuilder.compiler
4 messages
4 total messages
Started by P.Michael Hutchins
Fri, 12 May 2006 16:31
setTimeInMillis()'s access protection
Author: P.Michael Hutchins
Date: Fri, 12 May 2006 16:31
Date: Fri, 12 May 2006 16:31
9 lines
1175 bytes
1175 bytes
What do I have to do to convince JBuilder (2006 12.0.203.0) to stop giving me the error message "setTimeInMillis(long) has protected access in java.util.Calendar"?
I've got it set to java 5, as best I can.
(:o Paths / JDK: 1.5.0_03-b07
o Build Java:
o Language Features: v 5.0 (generics enabled)
o Target VM: 5.0 & later
)
Re: setTimeInMillis()'s access protection
Author: Shankar Unni
Date: Fri, 12 May 2006 19:48
Date: Fri, 12 May 2006 19:48
19 lines
1758 bytes
1758 bytes
P.Michael Hutchins wrote: > What do I have to do to convince JBuilder (2006 12.0.203.0) to stop giving > me the error message "setTimeInMillis(long) has protected access in > java.util.Calendar"? > > I've got it set to java 5, as best I can. > (:o Paths / JDK: 1.5.0_03-b07 > o Build Java: > o Language Features: v 5.0 (generics enabled) > o Target VM: 5.0 & later > ) Apparently not quite. Calendar.setTimeInMillis(long) was protected in 1.1, but has been public since 1.2. Can you double-check your settings? (TeamB: are there hidden preferences panels that might override the obvious setting of language source and target levels?)
Re: setTimeInMillis()'s access protection
Author: Gillmer J. Derge [TeamB]
Date: Fri, 12 May 2006 20:16
Date: Fri, 12 May 2006 20:16
27 lines
2177 bytes
2177 bytes
Shankar Unni wrote:
> Can you double-check your settings? (TeamB: are there hidden preferences
> panels that might override the obvious setting of language source and
> target levels?)
I don't think so, but this kind of error often happens when the
classpath contains a reference to a JAR file that contains old versions
of JDK classes. For example, your application refers to
"JacksUtilityPack.jar", and Jack has decided for some reason that he
needs to include java.util.Calendar in his library.
The suggestion I usually make when this happens is to write a small test
program that contains something like the following.
public class Foo {
public static void main(String[] args) {
System.out.println("found at " +
Foo.class.getResource("java/util/Calendar.class"));
}
}
This will print a URL that shows where the application is finding
java.util.Calendar. Presumably that will be an old version of the
class, and you'll need to figure out how to get that off the classpath.
--
Gillmer J. Derge [TeamB]
Re: setTimeInMillis()'s access protection
Author: P.Michael Hutchins
Date: Mon, 15 May 2006 19:37
Date: Mon, 15 May 2006 19:37
23 lines
1943 bytes
1943 bytes
You are some dude, Gilmer! (& tnx too to Shankar) I took the mindless bulldog route, & did a binary search over my Required Libraries (prompted by finding that a colleague using JBuilder wasn't having the same problem - & then that another Project of mine wasn't) (not aided by the way JBuilder works, but...) until I found the offender. (: XmlBlaster thought it would be useful, for some reason to silently include a JAR file full of old "containers" - including Calendar.) very confusing state of affairs! a coupla things that JBuilder could do to help this situation: o If it's gonna use an ... ancient supercession ... like this for its ~code insight~ and compilation, then when one does a Find Definition, it oughta take one *there* (instead - maximally confusingly - to the superseded (current official) class. o ways to find out what JAR file(s) contain a given class Thanks a BUNCH! -- M.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads