We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,390 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

jar issue

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)..

3
Contributors
4
Replies
7 Hours
Discussion Span
5 Months Ago
Last Updated
6
Views
Question
Answered
harinath_2007
Posting Pro
509 posts since Aug 2010
Reputation Points: 108
Solved Threads: 46
Skill Endorsements: 3

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 :)

bibiki
Posting Whiz
372 posts since Nov 2009
Reputation Points: 44
Solved Threads: 31
Skill Endorsements: 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?

harinath_2007
Posting Pro
509 posts since Aug 2010
Reputation Points: 108
Solved Threads: 46
Skill Endorsements: 3

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.

stultuske
Industrious Poster
4,382 posts since Jan 2007
Reputation Points: 1,318
Solved Threads: 610
Skill Endorsements: 24

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.

harinath_2007
Posting Pro
509 posts since Aug 2010
Reputation Points: 108
Solved Threads: 46
Skill Endorsements: 3
Question Answered as of 5 Months Ago by bibiki and stultuske

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0692 seconds using 2.75MB