ant 스크립트를 가져 오려고했습니다. 그리고 성공했습니다. 하지만 내가 그것을 컴파일하면.문제점 Netbeans 6.1에서 Ant 스크립트 실행
root
+-build(all *.class store here)
+-images
+-nbproject(netbeans create it)
+-sounds(voice.wav where i want to load)
+-src(all *.java - When i compile. All *.class will store to "build" folder)
+-build.xml
내 질문은 클래스 파일 (SimpleSoundPlayer.class) 찾을 수 없습니다가 ".. \는 \의 voice.wav 소리"이유는 내 폴더 구조가
run-selected-file-in-src:
java.io.FileNotFoundException: ..\sounds\voice.wav (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at com.sun.media.sound.WaveFileReader.getAudioInputStream(WaveFileReader.java:205)
at javax.sound.sampled.AudioSystem.getAudioInputStream(AudioSystem.java:1162)
at SimpleSoundPlayer.<init>(SimpleSoundPlayer.java:35)
at SimpleSoundPlayer.main(SimpleSoundPlayer.java:12)
Exception in thread "main" java.lang.NullPointerException
at java.io.ByteArrayInputStream.<init>(ByteArrayInputStream.java:89)
at SimpleSoundPlayer.main(SimpleSoundPlayer.java:16)
D:\Windows\My Document\Latihan\Java\allsrc\ch04src\nbproject\ide-file-targets.xml:7: Java returned: 1
BUILD FAILED (total time: 0 seconds)
입니다 :이 오류가 발생했습니다 . 하지만 명령 행 "java SimpleSoundPlayer"에서 해봤을 때 괜찮습니다.
왜 이런 일이 발생합니까?
음 ... 재생할 때의 Thx. 내 "소리"폴더를 루트로 유지하는 또 다른 해결책이 있습니까? 나는 그것을 움직이지 않는 것을 의미한다. 가능합니까? – Kenjiro