Jump to content
Excelsior Forums
TomasW

getResource(), UNC-path

Recommended Posts

Hi,

I'm developing an application that is almost finished, but today I discovered a serious problem when I tried to run the program from an UNC-path.

I use the following code to fetch resources from the compiled exe-file.

getClass().getResource("/picture.jpg")

Everything works fine when executing the program from a local drive or a network (mapped) drive.

But, when I launch the program directly from an UNC path such as \\server\share\program.exe, the getClass().getResource("/picture.jpg") returns null!

Is there a workaround for this? I still want all my resources inside the program file.

Product: Excelsior Jet 4.5, mp3

Best regards,

TomasW

Share this post


Link to post
Share on other sites

More information:

1. The problem does not occur if the program is run from a subdir of the share, eg. \\server\share\subdir\resourcetest.exe

2. A jar file can run directly from a share without problem, eg. \\server\share\resourcetest.jar

3. If I place the jar file together with the program in \\server\share\, and then run resourcetest.exe, the program seems to find the resource inside the JAR FILE.

/ TomasW

Share this post


Link to post
Share on other sites

Hi Tomas,

we have managed to reproduce and fix this problem. A hot fix will be sent to you soon.

Please find a minute to post the results in this forum thread. Thanks.

Regards,

--ZZ Top

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×