🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.jbuilder.java.api
3 messages
3 total messages Started by Guy Perron Wed, 08 Oct 2003 22:19
getClassLoader does'nt find the file
#358
Author: Guy Perron
Date: Wed, 08 Oct 2003 22:19
10 lines
1308 bytes
With JBuilder7,
I try do
URL url = getClass().getClassLoader().getResource("a file that is in the
same directory as the.jpx file");
and I always get a null pointer for url. The same code is working with
Eclipse, and BlueJ but it does'nt work in Jbuilder.
Anybody as an idea why and what am I missing with JBuilder.
THanks ,

Guy Perron.
Re: getClassLoader does'nt find the file
#359
Author: Lori M Olson (TeamB)
Date: Thu, 09 Oct 2003 04:51
35 lines
2071 bytes
Guy Perron wrote:
> With JBuilder7,
> I try do
> URL url = getClass().getClassLoader().getResource("a file that is in the
> same directory as the.jpx file");
> and I always get a null pointer for url. The same code is working with
> Eclipse, and BlueJ but it does'nt work in Jbuilder.
> Anybody as an idea why and what am I missing with JBuilder.
> THanks ,
> 
> Guy Perron.
> 
> 

Because the file needs to be in the same directory as the jbuilder 
executable for that kind of call to work.

-- 

Regards,

Lori Olson (TeamB)

------------

Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.

Google Advanced Newsgroup Search
     http://www.google.ca/advanced_group_search
Other Newsgroup Searches:
     http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
     http://www.visi.com/~gyles19/fom-serve/cache/1.html
Re: getClassLoader does'nt find the file
#360
Author: Tor Iver Wilhelmsen (TeamB)
Date: Thu, 09 Oct 2003 07:12
12 lines
1505 bytes
"Guy Perron" <gperron@cmontmorency.qc.ca> writes:

> URL url = getClass().getClassLoader().getResource("a file that is in the
> same directory as the.jpx file");

That call will look for the resource at the root of the classpath,
i.e. the "classes" directory or any library defined for the project.

> and I always get a null pointer for url. The same code is working with
> Eclipse, and BlueJ but it does'nt work in Jbuilder.

Why do they place their project file in a dir placed on the classpath?
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads