1,105,578 Community Members

jar issue

Member Avatar
harinath_2007
Posting Pro
509 posts since Aug 2010
Reputation Points: 56 [?]
Q&As Helped to Solve: 51 [?]
Skill Endorsements: 4 [?]
 
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)..

Member Avatar
bibiki
Posting Whiz
393 posts since Nov 2009
Reputation Points: 18 [?]
Q&As Helped to Solve: 31 [?]
Skill Endorsements: 0 [?]
 
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 :)

Member Avatar
harinath_2007
Posting Pro
509 posts since Aug 2010
Reputation Points: 56 [?]
Q&As Helped to Solve: 51 [?]
Skill Endorsements: 4 [?]
 
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?

Member Avatar
stultuske
Posting Expert
5,342 posts since Jan 2007
Reputation Points: 938 [?]
Q&As Helped to Solve: 777 [?]
Skill Endorsements: 35 [?]
Featured
 
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.

Member Avatar
harinath_2007
Posting Pro
509 posts since Aug 2010
Reputation Points: 56 [?]
Q&As Helped to Solve: 51 [?]
Skill Endorsements: 4 [?]
 
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
You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article