BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Native Executable

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder IDE
View previous topic :: View next topic  
Author Message
Marie Ricketts
Guest





PostPosted: Fri Mar 18, 2005 8:29 pm    Post subject: Native Executable Reply with quote



Hi,

I have an application that was developed using JBuilder Foundation. The app
uses Java2D and it needs a GIF to run.

It works fine in JBuilder Foundation. I can create a JAR file and run it
outside of the IDE.

Now I would like to Natively Compile it. I have it loaded into JBuilder
Developer where it also works fine in the IDE but the natively compiled
executable throws a java.lang.NullPointerException because it can't find the
GIF. I have tried putting the gif in various locations relative to the
executable.

On the Project -> Project Properties -> Resource page I have tried it with
both *.gif = Copy and Do Not Copy. The error is the same either way.

Any thoughts greatly appreciated!

mrickett


Back to top
Knopfler
Guest





PostPosted: Fri Mar 18, 2005 8:49 pm    Post subject: Re: Native Executable Reply with quote



I am guessing that this is a static GIF file and the content of the GIF
wont change. If thats the case then add that GIF to your project (Add
files to the project option). Further load that GIF file in your code
like this


<your package name>.<your class name>.class.getResource ("your_file.GIF");

Hope this helps.



Marie Ricketts wrote:
Quote:
Hi,

I have an application that was developed using JBuilder Foundation. The app
uses Java2D and it needs a GIF to run.

It works fine in JBuilder Foundation. I can create a JAR file and run it
outside of the IDE.

Now I would like to Natively Compile it. I have it loaded into JBuilder
Developer where it also works fine in the IDE but the natively compiled
executable throws a java.lang.NullPointerException because it can't find the
GIF. I have tried putting the gif in various locations relative to the
executable.

On the Project -> Project Properties -> Resource page I have tried it with
both *.gif = Copy and Do Not Copy. The error is the same either way.

Any thoughts greatly appreciated!

mrickett



Back to top
Kevin Dean [TeamB]
Guest





PostPosted: Sun Mar 20, 2005 5:21 pm    Post subject: Re: Native Executable Reply with quote



Marie Ricketts wrote:

Quote:
I have an application that was developed using JBuilder Foundation.
The app uses Java2D and it needs a GIF to run.

It works fine in JBuilder Foundation. I can create a JAR file and run
it outside of the IDE.

Now I would like to Natively Compile it. I have it loaded into
JBuilder Developer where it also works fine in the IDE but the
natively compiled executable throws a java.lang.NullPointerException
because it can't find the GIF. I have tried putting the gif in
various locations relative to the executable.

On the Project -> Project Properties -> Resource page I have tried it
with both *.gif = Copy and Do Not Copy. The error is the same either
way.

Look at the JAR file on which the native executable is based. If the
GIF file isn't in the JAR file, then it won't be in the executable,
hence your problem.

--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/

NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
http://www.datadevelopment.com/papers/index.html

Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder IDE All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.