Jump to content
Excelsior Forums
Sign in to follow this  
lokesh

How to load images.

Recommended Posts

Hi,

How to bind resources files (images  and conf files) into my executables created through jc commandline utility.

The following error is thrown while starting the application executable,

From converting images ;java.lang.NullPointerException

Seeing documentation I also tried setting the classpath to the directories that contain these images and also to the jar files (that contains images), but no use. Any help will be highly appreciated.

Lokesh.

Share this post


Link to post
Share on other sites

If you prefer to use the command line interface to the JET compiler, the most reliable way to accomplish your task is as follows:

1) pack your application into a set of jar files (no resources should reside in directories)

2) make sure that it works under HoSpot VM:

 - create an empty directory

 - copy the jars to it

 - make the directory current

 - run your application using the "java" launcher

3) compile your application using the following command:

jc +bindresources YourJar1.jar YourJar2.jar YourJarK.jar

If you carefully perform stet 2, it should help.

Cheers,

--zz top

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

Computer Science is no more about computers than astronomy is about

telescopes. -Edsger W. Dijkstra, computer science professor

Share this post


Link to post
Share on other sites

Thats gr8 and now the images get loaded but the tree is not expanding, where could i find the errors to debug.

1) How to expand trees.

2) Is there any debug option to find the errors.

Lokesh.

Share this post


Link to post
Share on other sites

Is there any output in the console? Probably some exception is thrown when trying to expand the tree.

JET have little debugging options, because it is designed not to develop but to deploy Java application. So, if your app works with HotSpot VM, it generally should also work with JET.

One of the options is generating full stack trace (while default option is no stack trace). But, of course, it may be used only if some exception is printed to console.

Share this post


Link to post
Share on other sites
Sign in to follow this  

×