Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > loading a resource from a jar file

Reply
Thread Tools

loading a resource from a jar file

 
 
Ahmed Moustafa
Guest
Posts: n/a
 
      07-14-2004
Hi All,

When I generate the jar file from the command line, loading a resource
e.g. text file or gif works fine but when I "export" the jar file from
within eclipse (or using ant), the loading does not work. What is the
difference? And how can I fix this problem?

Thanks in advance,

Ahmed

 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      07-14-2004
On Wed, 14 Jul 2004 19:08:42 GMT, Ahmed Moustafa wrote:

> When I generate the jar file from the command line, loading a resource
> e.g. text file or gif works fine but when I "export" the jar file from
> within eclipse (or using ant), the loading does not work. What is the
> difference? And how can I fix this problem?


Put a '.' in column 21 of the glixleblot file.

If that does not work, try describing a
reproducible problem.

> Thanks in advance,


You're welcome.

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
 
Reply With Quote
 
 
 
 
Ahmed Moustafa
Guest
Posts: n/a
 
      07-14-2004
Andrew Thompson wrote:
> On Wed, 14 Jul 2004 19:08:42 GMT, Ahmed Moustafa wrote:
>
>
>>When I generate the jar file from the command line, loading a resource
>>e.g. text file or gif works fine but when I "export" the jar file from
>>within eclipse (or using ant), the loading does not work. What is the
>>difference? And how can I fix this problem?

>
>
> Put a '.' in column 21 of the glixleblot file.
>
> If that does not work, try describing a
> reproducible problem.


It is a reproducible problem!

getClass().getClassLoader().getResourceAsStream() does not work when I
export the jar from within eclipse but it works fine when I generate the
jar from the command line.

 
Reply With Quote
 
 
 
Reply

Thread Tools

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
java -cp a.jar -jar b.jar => Works on Windows, not on Debian cyberco Java 4 02-14-2006 06:27 AM
jaas.jar, jta.jar jdbc-stdext.jar missing from jdk1.5 RPM muttley Java 0 10-20-2005 02:40 PM
Differences of xercesImpl.jar, xercesImpl-J.jar, dom3-xercesImpl.jar ? Arnold Peters Java 0 01-05-2005 10:59 PM
Differences of xercesImpl.jar, xercesImpl-J.jar, dom3-xercesImpl.jar ? Arnold Peters XML 0 01-05-2005 10:59 PM
how to disassembly a .jar file? how to see what are the classes inside the .jar file? lucy Java 6 09-07-2004 09:54 PM



Advertisments