Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getResource returns null in Plugin project

 
Ken Masters
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone!

I looked so many days for the solution, but still can´t fix my problem.

I have this code:

This works perfectly in a java project.

I tried it now in a Plugin Project, but the resource varible is always null!
Please, can someone help me?

Best regards
Ken

 
Steve Luke
Bartender
Posts: 4181
21
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is a ResourceSet? What is a Plugin Project?

Presumably you have some other application and you want to make a plug-in for it. Does the application have a security manager that does not allow you to reach outside your plug-in's folder/path/JAR/whatever for resources?
 
Ken Masters
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Steve Luke wrote:What is a ResourceSet? What is a Plugin Project?

Presumably you have some other application and you want to make a plug-in for it. Does the application have a security manager that does not allow you to reach outside your plug-in's folder/path/JAR/whatever for resources?


I do not know what the ResourceSet is for, I took the code from a tutorial long time ago.
Plugin Project: Right Click on Package Explorer->new->Plug-In Project.

My Plugin Project opens a second workspace.
There I can right click on a project and choose my own menu.
After clicking on this menu, the code (above) will running.
I can find nothing about a security manager.
 
Ken Masters
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think I know now, why the error occures.
It seems the code makes problems because I call it from a second workspace.
When I call it from the same workspace, everything is fine.
Any idea how to fix it?
 
Rob Spoor
Sheriff
Pie
Posts: 20512
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We still don't know what this Plugin Project is. Is it an Eclipse plugin you're trying to create, or what?
 
Ken Masters
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Spoor wrote:We still don't know what this Plugin Project is. Is it an Eclipse plugin you're trying to create, or what?


Yes, it is an eclipse plugin.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic