Jump to content

Recommended Posts

Posted

i am trying to get the path for the image folder in java as input stream.. kani adhi null value throw chesthundhi.. look i am missing something here ..

 

 InputStream stream = this.getClass().getClassLoader().getResourceAsStream("image/" + "abcd.gif")

 

 

 

---- project
          |--Temp
          |--Temp1

          |--Temp2

          |--Temp3

                |--src

                |--web

                     |--images

                          |--abcd.gif

Posted

Bhayya aa abcd.gif backend code nuchi vasthundhi ... so ekkada  aa path file thappu anipsithundhi because its not in resrouce folder kabbati...

"Image/abcd.gif" not "image/"+adbd.gif

 

Posted

class file ekkada generate avutundo aa path ivvaali ani na friend tolded :d

Posted

Unknown source .... nullpointexception vasthundhi bhayya... but aa path lo file vundhi.. so looks like source path wrong

Exception post cheyi

 

Posted

bhayya folder name "image" badulu "images" ani vundalanyukunta code lo

 

InputStream stream = this.getClass().getClassLoader().getResourceAsStream("images/" + "abcd.gif")

Posted

bhayya folder name "image" badulu "images" ani vundalanyukunta code lo

 

InputStream stream = this.getClass().getClassLoader().getResourceAsStream("images/" + "abcd.gif")

 

This looks right. TS give a try.

Posted

Bhayya adhi correct ga pettanu images ani... kani doubt enti ante edho resource folder lo ledhu so getResourceAsStream () find out avvadam ledhu anukunta...,,,.. still null value vasthundhi

bhayya folder name "image" badulu "images" ani vundalanyukunta code lo

 

InputStream stream = this.getClass().getClassLoader().getResourceAsStream("images/" + "abcd.gif")

 

×
×
  • Create New...