Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #18305

Re: How to include a text file in my executable JAR file?

Path csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail
From Roedy Green <see_website@mindprod.com.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: How to include a text file in my executable JAR file?
Date Thu, 23 Aug 2012 14:00:23 -0700
Organization Canadian Mind Products
Lines 21
Message-ID <re6d38997sdkg33ljnbeeeaqislmnlakea@4ax.com> (permalink)
References <30f3250b-9cea-402f-929a-3191d05a81f2@googlegroups.com>
Reply-To Roedy Green <see_website@mindprod.com.invalid>
NNTP-Posting-Host K2Qzzs3EAqXk5RLzfhxcSw.user.speranza.aioe.org
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
X-Complaints-To abuse@aioe.org
X-Notice Filtered by postfilter v. 0.8.2
X-Newsreader Forte Agent 6.00/32.1186
Xref csiph.com comp.lang.java.programmer:18305

Show key headers only | View raw


On Thu, 23 Aug 2012 08:01:19 -0700 (PDT), zyng <xsli2@yahoo.com>
wrote, quoted or indirectly quoted someone who said :

>My Java program needs to access a text file(in fact, the
 Java code will use Linux System command "cp" to copy this text file
to a destination folder during running). Suppose this is my Java
program HelloWorld.java:

you include it with ANT or Jar.exe

You access it using getResource or getResourceAsStream.
See http://mindprod.com/jgloss/resource.html

for image examples see http://mindprod.com/jgloss/image.html
-- 
Roedy Green Canadian Mind Products http://mindprod.com
A new scientific truth does not triumph by convincing its opponents and making them see the light,
but rather because its opponents eventually die, and a new generation grows up that is familiar with it.
~ Max Planck 1858-04-23 1947-10-04 

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

How to include a text file in my executable JAR file? zyng <xsli2@yahoo.com> - 2012-08-23 08:01 -0700
  Re: How to include a text file in my executable JAR file? zyng <xsli2@yahoo.com> - 2012-08-23 08:04 -0700
  Re: How to include a text file in my executable JAR file? Jan Burse <janburse@fastmail.fm> - 2012-08-23 17:23 +0200
    Re: How to include a text file in my executable JAR file? Jeff Higgins <jeff@invalid.invalid> - 2012-08-23 11:51 -0400
      Re: How to include a text file in my executable JAR file? Jeff Higgins <jeff@invalid.invalid> - 2012-08-23 11:53 -0400
  Re: How to include a text file in my executable JAR file? Lew <lewbloch@gmail.com> - 2012-08-23 13:43 -0700
  Re: How to include a text file in my executable JAR file? Roedy Green <see_website@mindprod.com.invalid> - 2012-08-23 14:00 -0700

csiph-web