1.11M Members

jar issue

 
0
 

I'm having tough time with netbeans. I am trying to add external image files to the netbeans project but confused where to place them. I copied the image files in every folder of netbeans(as i was tired) but nothing worked.
Where exactly I should place the external resource files(images,videos,auidos etc)..

 
0
 

you sound like you have problems accessing the files no matter where you place them, and not with where exactely to put them. I do not know about netbeans... but if you are having difficulties with accessing your files, first thing that comes to mind is that you have paths hard coded and that inside quotes, your backsalsh are very likely not correctly typed in.... they should be doubled... example:
"c:\mycomp\myfolder\myfile...." <-- see, double slashes :)

 
0
 

you sound like you have problems accessing the files no matter where you place them, and not with where exactely to put them. I do not know about netbeans...

haha..No..My application displays the images perfectly when i try in other editor.(Editplus). The problem occurs only when i try it in netbeans.
The path is correct and i do know about that double slash. My question is where exactly i should place the external resource files(images,media files etc) in netbeans project folder?

 
0
 

if they are external, they can be placed: "external".
do remember that your java code is not dependant of the IDE you use, so if it works in eclipse (or editplus), it'll (should) work in netbeans as well.

but the path to the images might differ, since it's not the java files, but the .class files that need them, and not all the ide's put these in the same place(s) on your harddrive.

 
0
 

and not all the ide's put these in the same place(s) on your harddrive.

Yeah...that was the main problem.. These IDE's really sucks and gets worse for every version they release. Instead of understanding & using different IDE's , we can actually learn a new programming language in that time...

Anyways , my problem got solved..thanks for all replies....The solution was that i need to load the images using url and getStream() method.

Question Answered as of 1 Year Ago by stultuske and bibiki
Isn't it about time forums rewarded their contributors?

Earn rewards points for helping others. Gain kudos. Cash out. Get better answers yourself.

It's as simple as contributing editorial or replying to discussions labeled or OP Kudos

You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article