UpCount - recursive calamity
UpCount - recursive calamity
Ev'ning,
no problems solving it, but since my JavaVM stopped because of a stack overflow, when I tried to run the code, I had to port it to C...
I'm wondering, whether there is any option to increase the default stack-size in java?
no problems solving it, but since my JavaVM stopped because of a stack overflow, when I tried to run the code, I had to port it to C...
I'm wondering, whether there is any option to increase the default stack-size in java?
Ah, thanks!lechat wrote:what about 'java -X'? Then you can use 'java -Xss1024M' for 1Gb stack size...
I don't work with Java normally, since I don't like bytecode,
so I didn't know any parameters..
Well, not any more, since I've done that challenge,But do you really need it?
but we're hacking to learn, aren't we?
And next time I need to run some heavy recursive java code,
I'll know how to increase the stacksize
-
- Posts: 7
- Joined: Fri Mar 06, 2009 11:10 am
-
- Posts: 5
- Joined: Fri Mar 06, 2009 10:14 am
Hello,
i have a problem with the upcount challenge. I installed jdk 1.6.0_17 and compiled the class file without any problems but when i run the classfile i got an exception:
Exception in thread "main" java.lang.NoClassDefFoundError: upcount/class
Could not find the main class: upcount.class. Program will exit.
I really dont understand that because i changed nothing in the upcount.java file.
I hope the text above is not a spoiler...
thx in advance(?)
Sandy
i have a problem with the upcount challenge. I installed jdk 1.6.0_17 and compiled the class file without any problems but when i run the classfile i got an exception:
Exception in thread "main" java.lang.NoClassDefFoundError: upcount/class
Could not find the main class: upcount.class. Program will exit.
I really dont understand that because i changed nothing in the upcount.java file.
I hope the text above is not a spoiler...
thx in advance(?)
Sandy
-
- Posts: 5
- Joined: Fri Mar 06, 2009 10:14 am
-
- Posts: 106
- Joined: Thu Oct 29, 2009 9:21 pm
-
- Posts: 5
- Joined: Fri Mar 06, 2009 10:14 am
-
- Posts: 36
- Joined: Mon Aug 10, 2009 5:03 am
- Location: Texas
- Contact:
When running a Java application from the command line you don't want to append the .class extension. Just the class name. So in your case it would be something like
Code: Select all
java upcount
Last edited by megatron40 on Thu Dec 24, 2009 7:18 pm, edited 1 time in total.
"The man who doesn't read... has no advantage over the man who can't read..." - Mark Twain
-
- Posts: 5
- Joined: Fri Mar 06, 2009 10:14 am