Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-08-2008, 08:59 AM
pranav13's Avatar
Member
 
Join Date: Oct 2008
Location: Greater Hyderabad
Posts: 37
Rep Power: 0
pranav13 is on a distinguished road
Default cudnt run jar file builded in netbeans!
hi all,
im new to java. i have developed a small desktop app using swings. it is working fine in the IDE but when running the jar file, it is giving error.
problem might be of the path of txt file i have read in the program.
please tell me how to refer a local file in the jar file.
i kept a txt file in the resources folder in the jar file and want to access it from my java file.
i have used getClass().getResource("/xyz/resources/abc.txt");
but it is not working properly after building jar.


any suggestions/solutions is appreciated.

thanks in advance!
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 10-08-2008, 02:56 PM
Norm's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Heredia, Costa Rica
Posts: 2,225
Rep Power: 4
Norm is on a distinguished road
Default
Quote:
it is giving error.
Please copy and paste full text of error here.
In the path to the resource, leave off the leading /
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 10-09-2008, 04:29 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 6,525
Rep Power: 9
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Default
pranav13, you have discuss quite similar question in another thread. So it's better to stick with one, actually with the other one. Because lots of replays you can find there.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Someone helped you?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.
Help:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Resources:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Web:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Tips:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
help with netBeans the godfather01 NetBeans 11 02-01-2009 04:48 PM
file not found outside of Netbeans annie NetBeans 0 06-21-2008 10:10 PM
NetBeans 5.5.1 Help. padutch2 New To Java 6 12-03-2007 03:01 AM
netbeans 64 bit caspermel NetBeans 1 06-26-2007 10:29 PM
About using netbeans yuchuang NetBeans 3 05-27-2007 08:06 PM


All times are GMT +2. The time now is 10:14 PM.



VBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org