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?

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 2012-08-23 14:00 -0700
Organization Canadian Mind Products
Message-ID <re6d38997sdkg33ljnbeeeaqislmnlakea@4ax.com> (permalink)
References <30f3250b-9cea-402f-929a-3191d05a81f2@googlegroups.com>

Show all headers | 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