rocket mass heater kickstarter
The moose likes Java in General and the fly likes getResource returns null in Plugin project Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "getResource returns null in Plugin project" Watch "getResource returns null in Plugin project" New topic
Author

getResource returns null in Plugin project

Ken Masters
Greenhorn

Joined: May 14, 2013
Posts: 8
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

Joined: Jan 28, 2003
Posts: 4181
    
  21

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?


Steve
Ken Masters
Greenhorn

Joined: May 14, 2013
Posts: 8
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

Joined: May 14, 2013
Posts: 8
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

Joined: Oct 27, 2005
Posts: 19914
    
  23

We still don't know what this Plugin Project is. Is it an Eclipse plugin you're trying to create, or what?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Ken Masters
Greenhorn

Joined: May 14, 2013
Posts: 8
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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: getResource returns null in Plugin project