Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think first, you should paste your exception code!<br> then, I think java I/O support the both two way: </p> <blockquote> <p>"C:/audiofile.wav"<br> "C:\audiofile.wav" </p> </blockquote> <p>import java.io.BufferedReader; import java.io.FileInputStream; import java.io.InputStreamReader;</p> <p>public class Main {</p> <pre><code>public static void main(String[] args) { // write your code here String fileLocation = "C:\\1.diff"; String fileLocation1 = "C:/1.diff"; try { FileInputStream f = new FileInputStream(fileLocation); BufferedReader reader = new BufferedReader(new InputStreamReader(f)); String line = reader.readLine(); System.out.println("11111111111111111111111111"); while (line != null) { // Process line line = reader.readLine(); System.out.println(line); } System.out.println("11111111111111111111111111"); } catch (Exception ex) { System.out.println(ex); } try { FileInputStream ff = new FileInputStream(fileLocation1); BufferedReader reader1 = new BufferedReader(new InputStreamReader(ff)); String line1 = reader1.readLine(); System.out.println("2222222222222222222222222"); while (line1 != null) { // Process line line1 = reader1.readLine(); System.out.println(line1); } System.out.println("2222222222222222222222222"); } catch (Exception ex) { System.out.println(ex); } } </code></pre> <p>}</p> <p>it works. I don't know what you did, anyway paste your error msg!</p> <p>====</p> <pre><code>``` private static void B() { String filename = "C:\\test.wav"; InputStream in = null; try { in = new FileInputStream(filename); } catch (FileNotFoundException ex) { System.out.println("File not found"); } try { AudioStream s = new AudioStream(in); AudioPlayer.player.start(s); } catch (IOException ex) { System.out.println(ex.getMessage()); } } ``` </code></pre> <p>it works!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload