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");

1 Answer 1

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"); 
Sign up to request clarification or add additional context in comments.

1 Comment

No. I dont need any Java class' resources. I need to read any text file, or copy images, audio files etc....... Could you please help.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.