How do I save in same dir as my application?

I have this problem that if I save to user.dir it gets saved alright when running my app as standalone, while in netbeans it appears in the netbeans installation dir. Anyway of making sure it’s saved in the right dir. Just like loading through the class loader as that works both inside and outside of netbeans :slight_smile:

You should be able to configure the working directory for use when running your application from Netbeans.

Otherwise there is probably a way to figure out the path to your class or jar files through the class loader.