Questions tagged [ioexception]

IOException is the general class of exceptions produced by failed or interrupted input/output operations in several languages, including Java and C#.

IOException is the general class of exceptions produced by failed or interrupted Input/Output operations in several languages, including Java and C# and other .NET languages.

1451 questions
-3
votes
2 answers

i get Exception in thread "main" java.util.InputMismatchException when running code

Exception in thread "main" java.util.InputMismatchException at java.util.Scanner.throwFor(Unknown Source) at java.util.Scanner.next(Unknown Source) at java.util.Scanner.nextInt(Unknown Source) at…
-3
votes
2 answers

BMI calcuation in Java

I have been new to Java. Today, I am doing project on java on BMI calculation. My code so far is: package extra_programs; import java.io.*; public class bmiCalculation { public static void main(String[] args) { // TODO Auto-generated…
pallavidestiny22
  • 335
  • 1
  • 8
  • 19
-4
votes
1 answer

Generalizing rule: What operations ALWAYS cause IOException?

May I generalize that any operation with a file may cause IOException (IOE)? Including just reading a file, just checking its attributes (name, timestamp)? I am trying to find logic in API methods throwing IOException, so I try to understand and…
user10777718
  • 723
  • 4
  • 16
-4
votes
3 answers

java.io.IOException: Mark invalid

public void createNewUser(String name, String passwort) { try { br = new BufferedReader(new FileReader("Data.txt")); } catch (FileNotFoundException brCreateError) { brCreateError.printStackTrace(); } …
Nico S.
  • 77
  • 1
  • 1
  • 9
-4
votes
3 answers

Scala Play Framework IOException error

I got a project from friend. On windows 7 everything is working ok but when i switch to windows XP i am getting "IOException: Device not ready" error. Some details: Windows XP NTFS file system Error stack available by Play: Unexpected…
user3257442
  • 67
  • 2
  • 8
-5
votes
5 answers

How to catch an exception thrown by a function?

My function has thrown an IOException of the following format. How do I catch an exception written like this, I've used the standard try/catch blocks. public static void loader(int[] arr, String file) throws IOException { Scanner sc = new…
Mutating Algorithm
  • 2,604
  • 2
  • 29
  • 66
-5
votes
1 answer

Alternate code for Throws IOException

What changes do I need to make in the code If I remove the line "throws IOException"?? import java.io.*; class Buffered_class{ public static void main(String[] args) throws IOException // remove this line { char…
brijesh
  • 19
-5
votes
1 answer

For String Input : "" exception

I have weird exception about connector codes on java with soap service , I have generated source code due to wsdl and I put that to my project but I couldn't worked properly , I got belove exception but the weird thing is I cropped that wsdl source…
-5
votes
1 answer

Explanation for IOException

I am new to Java and I want to know when an IOException occurs and what is it actually. I also came across a point that whenever we use BufferedReader class to read input from console the code should be kept within try block and we should have a…
darsha
  • 61
  • 1
  • 9
-6
votes
1 answer

';' expected while i follow tutorial

package com.company; import java.io.*; import java.util.Scanner; public class Main { public static void main(String[] args) { throw IOException{ } } } Can some body help me please i follow tutorial but it show up ';'…
Supagon Srisawas
  • 113
  • 1
  • 1
  • 9
-6
votes
1 answer

my program run 100% from compiler put not run 100% from dist

my java progeam run 100% if i run it from the compiler netbeans put if i run it from file manager its will be in dist folder inside the project (the program have a button that run wav file) the button have a catch ioexception if i run it from…
1 2 3
96
97