HELP!!! Error "code too large"

Hello, I am working on a program that has become very large... and apparently it is too large now...

When I try to compile the program it generates an error, "code too large", the code has exceeded 10000 lines and now I dont know what to do. Anyone that has any ideas? Thankful for any response...

[317 byte] By [Freddef] at [2007-9-30 6:38:33]
# 1
Good heavens 10000 lines, in one method or what?It's called:Refactor your code into smaller methods, which should be done regardless of this error, for greater readability and maintainability and OOP principles.
warnerja at 2007-7-1 21:30:03 > top of Java-index,Administration Tools,Sun Connection...
# 2
Actually there is several small methods, not just one... and I dont know what else to do...
Freddef at 2007-7-1 21:30:03 > top of Java-index,Administration Tools,Sun Connection...
# 3
> Actually there is several small methods, not just> one... and I dont know what else to do...Refactor into smaller classes too, not have one or more big monolithic classes which are probably doing too much.
warnerja at 2007-7-1 21:30:03 > top of Java-index,Administration Tools,Sun Connection...
# 4
Blame the hardware and ask for a something titanic.
talon747 at 2007-7-1 21:30:03 > top of Java-index,Administration Tools,Sun Connection...
# 5
Break you code into smaller classes and call them when required. You do not have to create a single file with 10000 lines of code. Think about breaking it down
bolala at 2007-7-1 21:30:03 > top of Java-index,Administration Tools,Sun Connection...
# 6
The challenge in front of you is how to distribute responsibility over objects, or classes.You can start from here http://en.wikipedia.org/wiki/Object-oriented_programming#Basics_of_object-oriented_programming
terenaam at 2007-7-1 21:30:03 > top of Java-index,Administration Tools,Sun Connection...
# 7
There are 64k limits on several things (code per methods, constants, etc). See the end of this page: http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.htmland then break your code up into smaller pieces.
amorrow@earthlink.net at 2007-7-1 21:30:03 > top of Java-index,Administration Tools,Sun Connection...
# 8
Divide your code into various classes, Place then in same package then create there instances and use them when needed.
ShivaKatula at 2007-7-1 21:30:03 > top of Java-index,Administration Tools,Sun Connection...
# 9

Let's say, for instance, that I wnat to initialize an array instance variable that will contain 7462 integer values in my constructor, just as an example. I'm not really sure if this exceeds the maximum size for a java array, but if it does that would be just as useless a restriction as this "code too large" thing. If I write huge code that means I need huge code. [ goes to write program in C, which would be my advice here. :) ]

Doug_T at 2007-7-1 21:30:03 > top of Java-index,Administration Tools,Sun Connection...
# 10
You went to the trouble of registering in order resurrect a three-year-old thread by posting a pointless, misinformed, content-less response.Who are you people?Grant
ggainey at 2007-7-1 21:30:03 > top of Java-index,Administration Tools,Sun Connection...
# 11
at least he's not a spammer...
jwenting at 2007-7-1 21:30:03 > top of Java-index,Administration Tools,Sun Connection...
# 12
of course he doesn't realise that with C he'll run into exactly the same thing if he creates a single compiled unit that exceeds the capabilities of his operating system to load.
jwenting at 2007-7-1 21:30:03 > top of Java-index,Administration Tools,Sun Connection...