Compiling the Java API

Hi,

I'm relatively new to developing in Java, so this might be a very dumb question...

Recently, I downloaded the JDK and the source for the Java API and I've been trying to compile everything in java.util.

Frustratingly, I can't get all of the classes in java.util to compile straight off the bat.. Specifically, the classes Locale, Currency, JapaneseImperialCalendar and Calendar report a missing symbol error - either for LocaleData or OpenListResourceBundle.

I've tried hunting for the source for both of these classes, and also looked around the web to see what I could find, but found nothing. I've also looked for a class file or jar file that might be missing from my class path but I haven't found anything that looks useful.

So something in the configuration of what I'm doing is wrong - if anyone can offer any help on getting java.util to compile I would greatly appreciate it!

Thanks,

Chris

[960 byte] By [ChrisFa] at [2007-11-27 6:12:35]
«« basic prob
»» tomcat
# 1

> Recently, I downloaded the JDK and the source for the

> Java API and I've been trying to compile everything in java.util.

Why?

It has already been compiled for you.

> ... I can't get all of the classes ... to compile straight off the bat ...

>

> I've tried hunting for the source

http://www.sun.com/software/communitysource/j2se/java2/download.xml

tschodta at 2007-7-12 17:19:59 > top of Java-index,Developer Tools,Java Compiler...
# 2
> Recently, I downloaded the JDK and the source for the> Java API and I've been trying to compile everything> in java.util.Presumably what you have is the source that comes with the SDK. That isn't sufficient. You need the full source code.
jschella at 2007-7-12 17:19:59 > top of Java-index,Developer Tools,Java Compiler...
# 3
If you just want to mess around try compiling java.util.regex. That might use just standard API classes.
jschella at 2007-7-12 17:19:59 > top of Java-index,Developer Tools,Java Compiler...
# 4

Hi,

Thank you all for your help - unfortunately, I specifically want to compile collections because I'm wanting to play around with and change some of them a little, and I figure the first thing to do is to get them compiling "out of the box".

Any suggestions as to where I can get the full source from would be much appreciated, I'm sure that's a particularly dumb question, but nonetheless I have looked for that as well with no luck.

Alternately, I'm sure that, e.g., LocaleData.class exists somewhere, even if it's only in a part of the JRE I've downloaded - else code which uses the Calendar class could never work! If anyone has any hints as to where I might find these class files that would also solve my problems!

Thanks :)

Chris

ChrisFa at 2007-7-12 17:19:59 > top of Java-index,Developer Tools,Java Compiler...
# 5
You can't legally deploy the result of these modifications and compilations so what exactly is the point?
ejpa at 2007-7-12 17:19:59 > top of Java-index,Developer Tools,Java Compiler...
# 6

> I specifically want to compile collections because I'm

> wanting to play around with and change some of them a little

>

> Any suggestions

>

> If anyone has any hints as to ... solve my problems

Maybe you can just extend the classes in question

or write wrapper classes to encapsulate.

> Any suggestions as to where I can get the full source

A link was provided already.

tschodta at 2007-7-12 17:19:59 > top of Java-index,Developer Tools,Java Compiler...
# 7
If a class uses another class then it is really unlikely to run if the second class doesn't exist.Obviously the Java API runs.So I would guess that your real problem is that you are not building correctly.
jschella at 2007-7-12 17:19:59 > top of Java-index,Developer Tools,Java Compiler...
# 8

Hello all,

* There was a link to the full source posted? Where? I *am* blind!

* Yep, agreed that there's definitely something wrong with the build process... any suggestions as to how I might fix it? I think it's my classpath that's missing something, but I haven't found, e.g., LocaleData.class in any of the JREs so... confused! If anyone can offer any help it'd be much appreciated! :)

Cheers,

Chris

ChrisFa at 2007-7-12 17:19:59 > top of Java-index,Developer Tools,Java Compiler...
# 9

> * There was a link to the full source posted? Where? I *am* blind!

Reply 1.

> * there's definitely something wrong with the build process...

> any suggestions as to how I might fix it?

> If anyone can offer any help it'd be much appreciated! :)

First tell us why you think compiling the source yourself is a better option than just extending existing classes or using encapsulation.

tschodta at 2007-7-12 17:19:59 > top of Java-index,Developer Tools,Java Compiler...
# 10
>> * There was a link to the full source posted? Where? I *am* blind!> Reply 1.Awesome, thanks! (Yes, it's true, I think I must be blind!)
ChrisFa at 2007-7-12 17:19:59 > top of Java-index,Developer Tools,Java Compiler...