JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 05.11.2020, 19:12
mostafaz4 mostafaz4 is offline
Baby Loader
 
Join Date: Aug 2012
Posts: 7
Talking Ability to import/add custom plugins?

JD2 is such a masterpiece to download anything anywhere, but sometimes there are some unpopular sites that are very important to some individuals but it is unfair to ask the staff to create that plugin because it's low demand

So, I think if anyone can create our custom plugins for those unpopular sites and just import them to JD2, that would be great.

I know anyone can download JD2 source code and add their own custom plugins, but it will require recompiling the whole JD2 which would be a hard task to do frequently...
Reply With Quote
  #2  
Old 05.11.2020, 19:29
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 69,698
Default

No need to recompile the whole JD2!
You just have to compile your own plugins once and place the class files into jd/plugins/decrypter or jd/plugins/hoster directory.
Restart JDownloader and it will use them
You can even customize existing plugins that way (extend existing class and use higher interfaceVersion)

That way you can use official JD2 build with all updates AND your own plugins

You only have to update your custom plugins in case of major changes to interfaces, but that hasn't happened since many years now

In case you need help with this, either ask here or via support@jdownloader.org

Of course you are free to contribute your plugins to official version as well
__________________
JD-Dev & Server-Admin
Reply With Quote
  #3  
Old 05.11.2020, 20:55
mostafaz4 mostafaz4 is offline
Baby Loader
 
Join Date: Aug 2012
Posts: 7
Default

I was trying this whole time to compile untampered official hoster plugin ".java" but it fails because it needs JD2 imported source code classes to be able to compile!

So, do I have to have an up-to-date full JD2 source code repository just to compile that single file plugin? or there is an easier way to do so?

That's why I was suggesting to implement the "import java plugin" feature to avoid the hassle of dealing with the rest of JD2 structure
Reply With Quote
  #4  
Old 05.11.2020, 22:19
mostafaz4 mostafaz4 is offline
Baby Loader
 
Join Date: Aug 2012
Posts: 7
Default

Ok, I was able to compile the plugin using only javac and the official JD2 compiled jars

Code:
javac.exe -cp JDownloader.jar;Core.jar Plugin.java

Developing custom plugins is way easier for me now, thanks!!!
Reply With Quote
  #5  
Old 05.11.2020, 23:57
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,291
Default

typically the IDE you develop in will self compile on save, these compiled class files are located in your workspace. You just need to find and copy them to a standalone JDownloader.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #6  
Old 06.11.2020, 10:24
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 69,698
Default

@mostafaz4:
Yes, you can just use the jars from JDownloader for compilation. But I would recommend to setup/use proper IDE and either
-setup IDE with full source (see https://svn.jdownloader.org/projects/jd)
or
-setup IDE with those jars as dependencies (JDownloader.jar, Core.jar and those from libs folder)

With help of IDE it's much easier/less error prone to develop/debug plugins
Once done, just copy over the compiled .class files from your bin folder to your JDownloader instance
__________________
JD-Dev & Server-Admin
Reply With Quote
  #7  
Old 06.11.2020, 10:25
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 69,698
Default

In case you need help/got questions ,just ask and we'll try our best to help you
__________________
JD-Dev & Server-Admin
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 03:22.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.