0

I have a plugin project, which copies some resource files from its own to another project. How can I refer the local files? Currently, I try like this, but it does not work.

FileInputStream fileStream = new FileInputStream("image.jpg");

Uma Shankar Subramani
  • 1,925
  • 2
  • 12
  • 12

1 Answers1

1

This can help you.

Basically you should put your files inside your project folder structure and reference it with relatives path. To get the files you should use

MyJavaClass.getClass().getResources("relative_path");
Community
  • 1
  • 1
Francisco Puga
  • 23,869
  • 5
  • 48
  • 64