Advertising (This ad goes away for registered users. You can Login or Register)

Java: Allow user's plug-in, but apply restriction on them

Programming on your favorite platform, for your favorite platform? Post here
Post Reply
asgard20032
Posts: 186
Joined: Thu Jan 20, 2011 1:16 pm
Location: Milky Way, Solar system, Earth, North America, Canada, Québec..... In front of my computer

Java: Allow user's plug-in, but apply restriction on them

Post by asgard20032 » Fri Jul 13, 2012 5:20 am

Is there a way to make a plug-in system in a Java program, where people would write some plug-in / extension in Java, then compile it? So that my program auto detect all class file in the plug-in directory, and then load the "Name I will choose that will be the entry function of plug-in) function, and execute its content?

If its possible, is there a way to restrict what that plug-in will have access to? For example, if I want to decide which function people are allowed to use?

If yes, can you give me some links on info on how to accomplish that.

I have a new interesting concept, the goal is not to limit the user, but more to give him freedom to develop is own thing, without cheating by using not allowed function. Can't give more detail, it will be a top secret project. If everything work well, I will release it in LGPL or BSD, I will only use portable library, totally cross-platform. If I can achieve what I mentioned, it will be my main project for the next month-year. If everything work well, maybe it will get in some repo of big distribution of linux, like Debian. I will give more detail on my project (Just want to be sure no one steal my idea...) in few week (maybe even in few day).

When I will say what it is, everyone will like the idea, and everyone will wait for the release to try out. I got THE IDEA...

If its not possible, I will maybe use lua, but wanted to be Java, because it will also help people to learn Java. If i can do it 100% java, maybe it will even be my project for school. Will give more detail soon, and I am sure you will follow how my project advance. Idea will be welcome for my project (of course, once I will say what it is you will be able to give idea and advice)
Advertising
Image

User avatar
m0skit0
Guru
Posts: 3817
Joined: Mon Sep 27, 2010 6:01 pm

Re: Java: Allow user's plug-in, but apply restriction on the

Post by m0skit0 » Thu Jul 19, 2012 9:51 am

Sure it can be done. I'm designing a plugin system at my new work (over Android). But since yours and mine are 100% secret, I can't give you hints :lol: Just think at it, it's not that hard. And learn proper Java to know all it can do (check reflection).

Good luck at it.
Advertising
I wanna lots of mov al,0xb
Image
"just not into this RA stuffz"

Post Reply

Return to “Programming”