Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Accessing Resource files in java

Name: Anonymous 2006-04-18 13:15

what's the best way to access resource files in java?

I am just trying some java3d examples and it uses a resource loader that creates an URL object with the file name,but i can't get it to work, any suggestions?

Name: Anonymous 2006-04-18 13:41

Ok, I guess i have to be more especific, it makes a call to class.getResource(filename), that should return a valid URL handler, but it returns null. I am not sure how does this call search the path of the resources.

Name: Anonymous 2006-04-18 14:04

>>1
new MacroResourceFactory().getResourceAccessor().loadResource(new ResourceParserFactory().get().parse(new BufferedReader(new FileReader("your file"))))

Name: Anonymous 2006-04-18 14:04 (sage)

Asking for Java help? In /prog/?

Name: Anonymous 2006-04-18 14:22

>>4
Let's not start the trolling, it may suck, but it's still a programming language...

Name: Anonymous 2006-04-18 17:55

I thought it was a torture device.

Name: Anonymous 2006-04-18 18:46 (sage)

>>6
is correct

Name: Anonymous 2006-04-18 18:57

>>1
DO NOT WANT

Name: Anonymous 2006-04-19 16:12

>>1
That's very easy, you just have to do:
Stream s = new Stream();
InputStream is = new InputStream(s);
BufferedInputStream bis = new BufferedInputStream(is);
BufferedInputStreamAccess bisa = new BufferedInputStreamAccess();
BufferedInputStreamAccessResource bisar = new BufferedInputStreamAccessResource();
or something, maybe you should read the javadoc...

Name: Anonymous 2006-04-21 9:08

BufferedInputStreamAccessResource bisar = new BufferedInputStreamAccessResource();
a real java programmer would write it like this:
BufferedInputStreamAccessResource MyBufferedInputStreamAccessResouceWithANameThatIsSeventyFiveCharactersLong = new BufferedInputStreamAccessResource();

Name: Anonymous 2006-04-21 12:36

>>10
NullPointerException!!! Game over! Play again? (y/n)

Name: Anonymous 2010-11-15 6:40

Name: Anonymous 2011-11-19 1:10

balls

Name: Anonymous 2012-03-28 2:20

my farts burn my anus
it hurts
in a good way

Don't change these.
Name: Email:
Entire Thread Thread List