Hi,
also im Nachhinein werd ich mir sicherlich denken :lol:, aber im Moment ist es einfach nur :bahnhof:.
Folgender Code (lasst euch nicht vom Thread stören, ist jetzt so aus meinem Programm rauskopiert):
Gibt bei mir folgendes:
C:\$Recycle.Bin
C:\autoexec.bat
C:\Boot\BCD
C:\Boot\BCD.LOG
C:\Boot\BCD.LOG1
C:\Boot\BCD.LOG2
C:\Boot\bootstat.dat
C:\Boot\cs-CZ\bootmgr.exe.mui
C:\Boot\cs-CZ
C:\Boot\da-DK\bootmgr.exe.mui
C:\Boot\da-DK
C:\Boot\de-DE\bootmgr.exe.mui
C:\Boot\de-DE
C:\Boot\el-GR\bootmgr.exe.mui
C:\Boot\el-GR
C:\Boot\en-US\bootmgr.exe.mui
C:\Boot\en-US\memtest.exe.mui
C:\Boot\en-US
C:\Boot\es-ES\bootmgr.exe.mui
C:\Boot\es-ES
C:\Boot\fi-FI\bootmgr.exe.mui
C:\Boot\fi-FI
C:\Boot\Fonts\chs_boot.ttf
C:\Boot\Fonts\cht_boot.ttf
C:\Boot\Fonts\jpn_boot.ttf
C:\Boot\Fonts\kor_boot.ttf
C:\Boot\Fonts\wgl4_boot.ttf
C:\Boot\Fonts
C:\Boot\fr-FR\bootmgr.exe.mui
C:\Boot\fr-FR
C:\Boot\hu-HU\bootmgr.exe.mui
C:\Boot\hu-HU
C:\Boot\it-IT\bootmgr.exe.mui
C:\Boot\it-IT
C:\Boot\ja-JP\bootmgr.exe.mui
C:\Boot\ja-JP
C:\Boot\ko-KR\bootmgr.exe.mui
C:\Boot\ko-KR
C:\Boot\memtest.exe
C:\Boot\nb-NO\bootmgr.exe.mui
C:\Boot\nb-NO
C:\Boot\nl-NL\bootmgr.exe.mui
C:\Boot\nl-NL
C:\Boot\pl-PL\bootmgr.exe.mui
C:\Boot\pl-PL
C:\Boot\pt-BR\bootmgr.exe.mui
C:\Boot\pt-BR
C:\Boot\pt-PT\bootmgr.exe.mui
C:\Boot\pt-PT
C:\Boot\ru-RU\bootmgr.exe.mui
C:\Boot\ru-RU
C:\Boot\sv-SE\bootmgr.exe.mui
C:\Boot\sv-SE
C:\Boot\tr-TR\bootmgr.exe.mui
C:\Boot\tr-TR
C:\Boot\zh-CN\bootmgr.exe.mui
C:\Boot\zh-CN
C:\Boot\zh-HK\bootmgr.exe.mui
C:\Boot\zh-HK
C:\Boot\zh-TW\bootmgr.exe.mui
C:\Boot\zh-TW
C:\Boot
C:\bootmgr
C:\BOOTSECT.BAK
C:\config.sys
Exception in thread "Thread-3" java.lang.NullPointerException
at Main$2$1.iterate(Main.java:88)
at Main$2$1.iterate(Main.java:93)
at Main$2$1.run(Main.java:82)
Ich versteh nich wie da ne NPE kommen kann, Zeile 82 ist
Was ist hier null?
Thx
also im Nachhinein werd ich mir sicherlich denken :lol:, aber im Moment ist es einfach nur :bahnhof:.
Folgender Code (lasst euch nicht vom Thread stören, ist jetzt so aus meinem Programm rauskopiert):
Java:
new Thread() {
public void run() {
for (File root : File.listRoots()) {
// skip floppy disk drive
if (root.toString().equals("A:" + File.separator)) {
continue;
}
if (root.exists()) {
iterate(root);
}
}
}
private void iterate(File root) {
for (File file : root.listFiles()) {
if (file == null) {
continue;
}
if (file.isDirectory()) {
iterate(file);
}
System.out.println(file.getPath());
}
}
}.start();
Gibt bei mir folgendes:
C:\$Recycle.Bin
C:\autoexec.bat
C:\Boot\BCD
C:\Boot\BCD.LOG
C:\Boot\BCD.LOG1
C:\Boot\BCD.LOG2
C:\Boot\bootstat.dat
C:\Boot\cs-CZ\bootmgr.exe.mui
C:\Boot\cs-CZ
C:\Boot\da-DK\bootmgr.exe.mui
C:\Boot\da-DK
C:\Boot\de-DE\bootmgr.exe.mui
C:\Boot\de-DE
C:\Boot\el-GR\bootmgr.exe.mui
C:\Boot\el-GR
C:\Boot\en-US\bootmgr.exe.mui
C:\Boot\en-US\memtest.exe.mui
C:\Boot\en-US
C:\Boot\es-ES\bootmgr.exe.mui
C:\Boot\es-ES
C:\Boot\fi-FI\bootmgr.exe.mui
C:\Boot\fi-FI
C:\Boot\Fonts\chs_boot.ttf
C:\Boot\Fonts\cht_boot.ttf
C:\Boot\Fonts\jpn_boot.ttf
C:\Boot\Fonts\kor_boot.ttf
C:\Boot\Fonts\wgl4_boot.ttf
C:\Boot\Fonts
C:\Boot\fr-FR\bootmgr.exe.mui
C:\Boot\fr-FR
C:\Boot\hu-HU\bootmgr.exe.mui
C:\Boot\hu-HU
C:\Boot\it-IT\bootmgr.exe.mui
C:\Boot\it-IT
C:\Boot\ja-JP\bootmgr.exe.mui
C:\Boot\ja-JP
C:\Boot\ko-KR\bootmgr.exe.mui
C:\Boot\ko-KR
C:\Boot\memtest.exe
C:\Boot\nb-NO\bootmgr.exe.mui
C:\Boot\nb-NO
C:\Boot\nl-NL\bootmgr.exe.mui
C:\Boot\nl-NL
C:\Boot\pl-PL\bootmgr.exe.mui
C:\Boot\pl-PL
C:\Boot\pt-BR\bootmgr.exe.mui
C:\Boot\pt-BR
C:\Boot\pt-PT\bootmgr.exe.mui
C:\Boot\pt-PT
C:\Boot\ru-RU\bootmgr.exe.mui
C:\Boot\ru-RU
C:\Boot\sv-SE\bootmgr.exe.mui
C:\Boot\sv-SE
C:\Boot\tr-TR\bootmgr.exe.mui
C:\Boot\tr-TR
C:\Boot\zh-CN\bootmgr.exe.mui
C:\Boot\zh-CN
C:\Boot\zh-HK\bootmgr.exe.mui
C:\Boot\zh-HK
C:\Boot\zh-TW\bootmgr.exe.mui
C:\Boot\zh-TW
C:\Boot
C:\bootmgr
C:\BOOTSECT.BAK
C:\config.sys
Exception in thread "Thread-3" java.lang.NullPointerException
at Main$2$1.iterate(Main.java:88)
at Main$2$1.iterate(Main.java:93)
at Main$2$1.run(Main.java:82)
Ich versteh nich wie da ne NPE kommen kann, Zeile 82 ist
Code:
iterate(root);
Thx