uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hannes Carl Meyer" <hannesc...@googlemail.com>
Subject Re: Making JAR files reading from within
Date Mon, 11 Aug 2008 09:37:20 GMT
Hi Ahmed,
yes it is possible to access files from inside the jar, but in which
context? In plain Java you can do something like this:
YourClass.class.getClassLoader().getResourceAsStream("yourpackage/resource");
Regards
Hannes

2008/8/8 Ahmed Abdeen Hamed <ahmed.elmasri@gmail.com>

> Hello,Is there a way to tell a jar file to access its contents (txt and
> config) files instead of looking for such files on the filesystem? I
> created
> a UIMA-based application and it is successfully working from my machine
> using the command-line. However, if I put the jar on another machine it
> doesn't look inside itself to access model files for examples. I have been
> looking into options and I found out that there is a way to access the
> jars's internals one file at a time, and read it contents online at at
> time.
> However, that makes me reinvent my application again to get it to
> manipulate
> the files from the jars even though my program has already done that. Is
> there a flag that you can turn on to tell the the jar to access its
> contents
> vs redoing this again programatically?
> Thank you for you help!
> -Ahmed
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message