Questions tagged [embedded-resource]

Resources (such as images and help files) that are embedded into the binary of the application itself and typically not available as files.

Embedded resources are resources such as images and help files that are embedded into the binary of the application itself. Such resources would normally not be available as files. There are methods available for loading resources from URLs or input streams in most languages.

Java

This is how an URL might be formed, that points to an embedded resource within a Jar on the run-time class-path of a Java based app.

URL url = this.getClass().getResource("/path/to/the.resource");

This is how an input stream reading from the embedded resource can be formed:

InputStream is = this.getClass().getResourceAsStream("/path/to/the.resource");

Several detailed tutorials and examples are cited here.

1918 questions
0
votes
1 answer

Web Dev: Strategy to maximise user website display speed

There are many specific 'display speed' amelioration techniques discussed on stackoverflow, however, you need to be aware of a particular option, before searching for how to do it. Therefore, a guide-line strategy would be useful, particularly for…
Marco-UandL
  • 164
  • 1
  • 9
0
votes
2 answers

Can not locate resource in root of executable jar

I have a program that is configured to use an Apache Shiro ini file for storing its users and permissions. The following code works in the IDE Code public static String loginModule(String heelName, String heelPass) { …
0
votes
1 answer

Web Start fails to find system resource

I have an app that runs fine when I am not attempting to use it as a web start app, but when I convert it to one in Netbeans, it goes belly up. The console is showing a null pointer exception when trying to get a resource that is located in a…
Rabbit Guy
  • 1,840
  • 3
  • 18
  • 28
0
votes
1 answer

Using resource files (CultureInfo) in C# class file

I need a help with using resource files in C# class files. My code: class errorMessages { private static ResourceManager LocRM = new ResourceManager("Project1.languageFile", typeof(errorMessages).Assembly); public static void…
Rodzio
  • 15
  • 5
0
votes
2 answers

update embedded documents mongodb with mongoid

I am having problem updating the embedded documents in mongodb. I have a following scenario. A User model has address as the embedded docs. I am able to embed the address to the parent model ie; User model but i still cant figure out how to update…
Gagan
  • 4,278
  • 7
  • 46
  • 71
0
votes
1 answer

Any Utilities to Check folder for files unreferenced by .RC file?

I could write something myself to accomplish this, but am hoping something already exists. I haven't found anything for it with Google, though. I have a .RC file which I can compile using Microsoft Windows Resource Compiler. I am wondering if…
Brian
  • 25,523
  • 18
  • 82
  • 173
0
votes
1 answer

Class Library As Embedded Resource In A Class Library

I have a C# class library that compiles to a DLL. My class library also references another class library DLL. I need to add the dependency DLL as an embedded resource so I only have 1 DLL file. This file is a plugin for software I have no control…
modernzombie
  • 1,987
  • 7
  • 25
  • 44
0
votes
1 answer

How to open embedded resource word document?

I have a embedded word template document in my project, I added it as resource (Resources.resx -> Add resource -> Add existing file) and now I want to open it something like this Microsoft.Office.Interop.Word.Application application = new…
whizzzkey
  • 926
  • 3
  • 21
  • 52
0
votes
0 answers

getImage() throws exception on commandline but not in eclipse?

I'm currently loading my images using the following function: public static Image loadImage(String path){ log.debug("loadImage> path: "+path); return…
Tinus Tate
  • 2,237
  • 2
  • 12
  • 33
0
votes
0 answers

Load a png file from a compilabe C source code

I converted a png -> c, with png2c. And I can compiled the source code with my code without a problem. My question is how can I access that part of the code in the my gtk_image_new_from_pixbuf? Anyone have stories about the subject? /Edit: Here is…
Joel
  • 1,805
  • 1
  • 22
  • 22
0
votes
2 answers

Deploy android app with default files

I want to install files in my application's documents directory when installing the app, and the app needs to be able to download a new version of these files if needed. At the moment, I am packaging these files in res/raw and copying them locally.…
Florian Doyon
  • 4,146
  • 1
  • 27
  • 37
0
votes
0 answers

Deactivate localization for embedded resources

I'm facing the following problem right now: In my project I have two embedded resources with the names test.en.js test.js Calling Assembly.GetExecutingAssembly().GetManifestResourceNames() lists only test.js. It took me a while to recognize that…
tris
  • 863
  • 4
  • 9
  • 22
0
votes
1 answer

JLabel.setVisible not working when netbeans project is converted to executable jar

I have a simple form with a button "Display", when clicked reads the content of "content.txt" file and displays the text in a label which is hidden and is made visible when the button is clicked. The project works when run as a netbeans project.…
Sabra Ossen
  • 161
  • 3
  • 15
0
votes
2 answers

How to get the name of an image resource as a string

I have tried a few methods to obtain a name including investigating PropertyItems and the old fashioned ToString() method to try to obtain the name of an image resource as a string. I have a selection of images, named, in a resources file. I have no…
Adsy2010
  • 525
  • 6
  • 23
0
votes
1 answer

How to read data from embedded database?

I wanna improve one application which database is unknown for me. So i have interface to work with but no data to fill forms/documents etc in a new application... Installation folder only containts .dll files without any clue of database. For now i…
KuKeC
  • 4,392
  • 5
  • 31
  • 60
1 2 3
99
100