i am making a program in which i have to allow the user to browse an image and store it with its details in image folder inside the source cod my code is working working in netbeans but when i make jar file the code is cot able to store image. i have stored some images through netbeans and able to access them using image/imanename.jpg but can't able to store images. help me as soon as possible. thank you the code i tried is
File f = new File(s);
long size=f.length();
FileInputStream fis1=new FileInputStream(f);
FileOutputStream fos2=new FileOutputStream("image/"+tfpn.getText()+".jpg");
byte b[]=new byte[10000];
int r=0;
long count=0;
while(true)
{
r=fis1.read(b,0,10000);
fos2.write(b,0,10000);
count = count+r;
if(count==size)
break;
System.out.println(count);
}
System.out.println("File copy complete");