Roman <> wrote:
> Here a stand-alone example:
>
>
> import java.net.URL;
>
> public class App {
> public static void main(String[] args) {
> App app = new App();
> System.out.println(
> (app.getClass().getResource("App.class")).getPath( )
> );
> }
> }
This code doesn't work. Or rather, it only works if your application is
composed of loose class files, but obviously isn't (or, at least,
hopefully isn't!) the case when you deploy the application.
I wrote a very complete and detailed answer to this question some time
ago. It's temporarily available in Word format at the following rather
ugly URL:
> http://www.javamoderator.org/Java%20...sic%20Data.doc
--
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation