hiho,
ich wollte gerade als aufgabe den fakultät von 10000 und irg wie spinnt er bei mir mit so BigInteger sachen
Code:
Error:
ich wollte gerade als aufgabe den fakultät von 10000 und irg wie spinnt er bei mir mit so BigInteger sachen
Code:
Java:
import java.math.BigInteger;
/**
*
* @author andreas
*/
public class Main {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
System.out.print(String.valueOf(factorial(3)));
}
static BigInteger factorial( int n )
{
BigInteger result = BigInteger.ONE;
if ( n == 0 || n == 1 )
return result;
if ( n > 1 )
for ( int i = 1; i <= n; i++ )
result = result.multiply( BigInteger.valueOf(i) );
return result;
}
}
Error:
Code:
java.lang.NoClassDefFoundError: org/apache/lucene/index/SegmentInfos$2
at org.apache.lucene.index.SegmentInfos.readCurrentVersion(SegmentInfos.java:402)
at org.apache.lucene.index.DirectoryReader.isCurrent(DirectoryReader.java:791)
at org.apache.lucene.index.DirectoryReader.doReopen(DirectoryReader.java:404)
at org.apache.lucene.index.DirectoryReader.reopen(DirectoryReader.java:348)
at org.netbeans.modules.java.source.usages.LuceneIndex$NoNormsReader.reopen(LuceneIndex.java:1207)
at org.netbeans.modules.java.source.usages.LuceneIndex.refreshReader(LuceneIndex.java:1103)
at org.netbeans.modules.java.source.usages.LuceneIndex._store(LuceneIndex.java:812)
at org.netbeans.modules.java.source.usages.LuceneIndex.access$300(LuceneIndex.java:110)
at org.netbeans.modules.java.source.usages.LuceneIndex$2.run(LuceneIndex.java:783)
at org.netbeans.modules.java.source.usages.LuceneIndex$2.run(LuceneIndex.java:781)
at org.netbeans.modules.java.source.usages.ClassIndexManager$2.call(ClassIndexManager.java:153)
at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:160)
at org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:227)
at org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:66)
at org.netbeans.modules.java.source.usages.ClassIndexManager.takeWriteLock(ClassIndexManager.java:150)
at org.netbeans.modules.java.source.usages.LuceneIndex.store(LuceneIndex.java:781)
at org.netbeans.modules.java.source.usages.SourceAnalyser.analyseUnitAndStore(SourceAnalyser.java:217)
at org.netbeans.modules.java.source.usages.PersistentClassIndex$6$1.run(PersistentClassIndex.java:237)
at org.netbeans.modules.java.source.usages.PersistentClassIndex$6$1.run(PersistentClassIndex.java:233)
at org.netbeans.modules.java.source.usages.ClassIndexManager$2.call(ClassIndexManager.java:153)
at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:160)
at org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:227)
at org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:66)
at org.netbeans.modules.java.source.usages.ClassIndexManager.takeWriteLock(ClassIndexManager.java:150)
at org.netbeans.modules.java.source.usages.PersistentClassIndex$6.run(PersistentClassIndex.java:232)
at org.netbeans.modules.java.source.usages.PersistentClassIndex$6.run(PersistentClassIndex.java:229)
at org.netbeans.api.java.source.JavaSource$MultiTask.run(JavaSource.java:478)
at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:154)
at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:138)
at org.netbeans.modules.parsing.impl.TaskProcessor$1.call(TaskProcessor.java:200)
at org.netbeans.modules.parsing.impl.TaskProcessor$1.call(TaskProcessor.java:197)
at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:160)
at org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:227)
at org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:66)
at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:197)
at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:106)
at org.netbeans.api.java.source.JavaSource.runUserActionTaskImpl(JavaSource.java:433)
at org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:404)
at org.netbeans.modules.java.source.usages.PersistentClassIndex.updateDirty(PersistentClassIndex.java:229)
at org.netbeans.modules.java.source.usages.PersistentClassIndex.search(PersistentClassIndex.java:147)
at org.netbeans.api.java.source.ClassIndex.getElements(ClassIndex.java:290)
at org.netbeans.modules.java.editor.overridden.ComputeOverriders.computeUsers(Unknown Source)
at org.netbeans.modules.java.editor.overridden.ComputeOverriders.computeUsers(Unknown Source)
at org.netbeans.modules.java.editor.overridden.ComputeOverriders.computeUsers(Unknown Source)
at org.netbeans.modules.java.editor.overridden.ComputeOverriders.processImpl(Unknown Source)
at org.netbeans.modules.java.editor.overridden.ComputeOverriders.process(Unknown Source)
at org.netbeans.modules.java.editor.overridden.ComputeAnnotations.computeAnnotations(Unknown Source)
at org.netbeans.modules.java.editor.overridden.ComputeAnnotations.run(Unknown Source)
at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:667)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
[catch] at java.lang.Thread.run(Thread.java:679)