Questions tagged [getresource]
283 questions
0
votes
2 answers
unable to get display metrics
I am making a game that displays animated characters on the screen
Now I am at the stage where i want it to display correctly on other devices as well
increase the screen resolution on my own device and have it still display correctly
for this I…

heckubiss
- 5
- 2
0
votes
2 answers
ModX getResources startId error
I'm having trouble with my getResources call. It should start at the top of the menu, and display each direct child. Here's the call:
[[!getResources?
&parents=`1`
&depth=`depth`
&limit=`0`
&tpl=`Home`
&tpl_2=`Section2`
&tpl_3=`Section3`…

symlink
- 11,984
- 7
- 29
- 50
0
votes
1 answer
Access a resource from a depending project
ProjectA
-src/main/java
-com.myApp.accessor
-resourceAccessor.java
-src/test/resources
-context.xml
-target/test-classes/context.xml
ProjectB (dependent on ProjectA)
-src/main/java
-xyz.java
Now…

Edmond
- 614
- 2
- 11
- 26
0
votes
0 answers
Jenkins CI cannot find the file
My file is under project/src/test/resources/fileToBeFound.xml and src/target/test-classes/fileToBeFound.xml. In my class, I'm using
this.getClass().getProtectionDomain().getCodeSource().getLocation().getPath()
to get the relative path which is…

Edmond
- 614
- 2
- 11
- 26
0
votes
2 answers
getResourceEntryName for an array item
I have a string array in strings.xml as detailed below:
- First
- Second
- Third
-

alezvic
- 344
- 1
- 4
- 20
0
votes
1 answer
Can I store a file in an ArrayList in Java using getResource?
New to Java. I am building a Java HTTP server (no special libraries allowed). There are certain files I need to serve (templates is what I call them) and I was serving them up using this piece of…

Kelly
- 619
- 8
- 18
0
votes
1 answer
Access xsd file in WebContent folder from a MessageBodyReader class
Inside a JAX-RS service I wan't to provide a XmlValidatonReader which validates incoming XML documents against an exising xsd file which is located in the WebContent directory.
The xsd file needs to be inside the WebContent folder because it…

My-Name-Is
- 4,814
- 10
- 44
- 84
0
votes
1 answer
Include file as input stream in scala
I'm having problems with using a file in my code. I'm working with javaPNS and trying to get it to work. What I think is wrong now is how I get my file for the keystore parameter in the Push.alert method in javaPNS.
What I'm really wondering is how…

malmling
- 2,398
- 4
- 19
- 33
0
votes
2 answers
ModX: getResources from document and documents children
I want to use getResources to get the content from a document, and its child documents. I believe I can used &depth to do this but I cannot seem to get it working.
I have tried 2 approaches:
echo "[[!getResources? $parents=`15` &includeTVs=`1`…

MeltingDog
- 14,310
- 43
- 165
- 295
0
votes
2 answers
getResources, get the latest resource per container
Using getResources, i want to get the latest resource created per container, so here's the resource tree structure:
-Parent
--Container 1
---Resource 1
---Resource 2
---Latest Resource
--Container 2
---Resource 1
…

PHP Noob
- 1,597
- 3
- 24
- 34
0
votes
2 answers
Localizing strings in strings.xml gives NullPointerException
My work computer that Eclipse is installed on does not have internet connectivity due to work related issues so all code and LogCat text has been hand typed instead of copy and pasted since I am on a separate laptop that Eclipse is installed right…

Matt
- 3,882
- 14
- 46
- 89
0
votes
2 answers
getResources().getString() is not defined for my class
Here is a string in my res/values-es/strings.xml file:
Text text text textttttttttt
Here is where I use it in my java code:
jc.add(new Question("42", "21", "33", "29", 0, getResources().getString(R.string.jcq1),…

Matt
- 3,882
- 14
- 46
- 89
0
votes
1 answer
How can i get the webApp location when using getResource method?
In my servlet:
protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
new Action();
}
In my Action class:
Action(){
System.out.println("--> " +…

Saad Lamarti
- 300
- 1
- 5
- 15
0
votes
1 answer
Android setdrawable from another class
Here's my code. I am trying to set background of a linear layout. But this xml (rowback) is not my main activity content, so gives errors. how can I set some XML from the class which doesn't have that XML in its…

user2226106
- 23
- 1
- 5
0
votes
3 answers
Main.class.getResource() and jTextArea
When I read a file from the jar file and want to put it in in a jTextArea, it shows me crypted symbols, not the true content.
What I am doing:
public File loadReadme() {
URL url = Main.class.getResource("/readme.txt");
File file = null;
…

Ueli Grueber
- 57
- 1
- 5