![]() |
|
#1
|
|||
|
|||
Extending the array elementsHi,
JAVA Code:
"Exception in thread "Thread-3" java.lang.ArrayIndexOutOfBoundsException: 100" Thanks in advance. Last edited by LuciWiz : 27-Dec-2007 at 15:39.
Reason: Please insert your Java code between [java] & [/java] tags
|
|
#2
|
||||
|
||||
Re: Extending the array elementsThat doesn't sound like a limit on the array... that's sounds more like 'num' was initially 100 when created [0-99], and then a value was attempted to be set at index 100 [in thread 3 somewhere?], then exception.
__________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#3
|
|||
|
|||
Re: Extending the array elementsOpps....
My num and numBig were initialized to 500 and 100. However, when num becomes 110 it all stopped. JAVA Code:
JAVA Code:
|
|
#4
|
||||
|
||||
Re: Extending the array elementsCan you possibly post more code, as 'num' is not used in the init() call? [If not, that's ok, some don't, but know that assistance might be limited]
There is nothing obvious in what was given, so far. [it's not clear from the two code blocks provided in post #3 are part of the same class (or not) because some of the declarations [i.e. Scope, and the double arrays] in the first part are not in the second, init() part]. Also, it's not clear what the animateThread, start, stop, or the run function(s) might be doing -- assuming that any of them are used. __________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#5
|
|||
|
|||
Re: Extending the array elementsHi,
Been a while. Somehow, the problem solved itself. Thanks TurboPT. The code expanded by the day, and now I am faced with another problem which is a frequent one amongst Java programmers. Exception in thread "Thread-3" java.lang.OutOfMemoryError: Java heap space I have googled to find what the rest have to say about this error, here is one: "On 4/28/06, Gary E. Daniels <gdaniels@xxxxxxxxxxx> wrote: I've run the Kermow program to transform the files in a directory and it works on the 1st two files in my directory, but then I get the following error messages: "Exception in thread "Thread-3"" "java.lang.OutOfMemoryError Java Heap Space" When I work on just a single file there is no problem. Any suggestions on correcting this error? Thanks. Try increasing the amount of memory available to the JVM (if you running it using the included run.bat file alter the -Xmx value in there, for example -Xmx1024) It's odd though... how big are your input files? (mail me back directly, or use the kernow mailing list as this is off-topic for xsl-list) cheers andrew" Does anyone have any idea which JVM file he is talking about? I cannot find any run.bat file, the one where the -Xmx is found. I saw a lot of JVM files in the Java folder C:\Program Files\Java\jdk1.6.0_02. I don't see anything that helps. Thanks again. |
|
#6
|
||||
|
||||
Re: Extending the array elementsQuote:
Possibly you might just have a memory leak issue? Check this, and this, and there is more!, just Google the last portion of that error: java.lang.OutOfMemoryError: Java heap space __________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#7
|
|||
|
|||
Re: Extending the array elementsThanks Turbo, I really appreciate your help.
|
|
#8
|
|||
|
|||
Re: Extending the array elementsThing is, how do I set
"java -Xms<initial heap size> -Xmx<maximum heap size>" in TextPad. Or should this be set somewhere else? I have no idea at the moment. |
|
#9
|
||||
|
||||
Re: Extending the array elementsTo add parameters to java.exe in Textpad:
Configure->Preferences->Tools->Run Java Application There's a 'Parameters' textbox where additional parameters can be specified. __________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#10
|
|||
|
|||
Re: Extending the array elementsI did something like the attached file, because I am running applet. Errors abound...
Code:
|
Recent GIDBlog
Toyota - 2008 September Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to sort in C++ alphabetically | wilen | C++ Forum | 5 | 20-Apr-2007 14:43 |
| 1-D array | jack999 | C Programming Language | 16 | 16-May-2006 12:38 |
| Need help deleting the last element in the array | headphone69 | C++ Forum | 2 | 15-Mar-2006 19:31 |
| Object Oriented Programming? | jake_jeckel | C++ Forum | 8 | 30-Oct-2005 12:25 |
| template comiling problems - need expert debugger! | crq | C++ Forum | 1 | 01-Feb-2005 21:26 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The