| View previous topic :: View next topic |
| Author |
Message |
Marie Ricketts Guest
|
Posted: Fri Mar 18, 2005 8:29 pm Post subject: Native Executable |
|
|
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
|
Posted: Fri Mar 18, 2005 8:49 pm Post subject: Re: Native Executable |
|
|
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
|
Posted: Sun Mar 20, 2005 5:21 pm Post subject: Re: Native Executable |
|
|
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 |
|
 |
|