Jump to content

Archived

This topic is now archived and is closed to further replies.

Hakuna

[TUT] How to compile scripts using eclipse

Recommended Posts

jeroenbrink, on 07 Feb 2013 - 19:03, said:

well i did everything correct but when i drag everything in my compiled map the script doenst show up in my script list ?

 

> You're not running in dev mode.

> The scripts contains errors/is outdated.

> You've done something wrong.

 

This tutorial does work - so it must be because something is wrong at your PC :/.

Share this post


Link to post
Share on other sites

Hakuna Matata, on 07 Feb 2013 - 15:19, said:

> You're not running in dev mode.

> The scripts contains errors/is outdated.

> You've done something wrong.

 

This tutorial does work - so it must be because something is wrong at your PC :/.

Every time I try to open eclipse.exe, I get: "Failed to load the JNI shared library "C:Program Files (x86)Javajdk1.6.0bin..jrebinclientjvm.dll"

 

Halp please

Share this post


Link to post
Share on other sites

Hakuna Matata, on 28 Dec 2012 - 11:14, said:

 

How to compile and add script sources.

Using eclipse.

 

 

Why eclipse is better than online compilers or .bat compilers:

  • You have all your scripts stored at one place, keeping it neat and simple.
  • Once its set up, the scripts gets compiled automatically!
  • You can see if it contains errors, before you add the script to the bot!
  • You can fix errors really quickly (eclipse helps you fix them)!

 

Setting up eclipse.

  • Download eclipse. It can be found here: eclipse.org/downloads/packages/eclipse-ide-java-developers/junosr1
  • Extract and open eclipse. It should now ask for a workspace. Just select your desktop.
  • Once eclipse is opened, go to File --> New --> Java Project. A new window should now open.
  • Give your project a name. It could be example; ParaBot. Click finish.
  • Once you've created a new java project, right click on your project folder and select 'Properties'. (Picture: puu.sh/1GoMc)
  • Go to Java Build Path --> Libaries --> Add External JARs and select your parabot.jar file. The bot client. (Picture: puu.sh/1GoRu). Click OK.
  • Once you've added your bot client, open your project folder, right click on scr and go to New --> Class. (Picture: puu.sh/1GoMc)
  • Name your class whatever you want, eclipse will automatically change the file name, to the right one. Click 'Finish'.
  • Eclipse should now look like this: puu.sh/1GoOO
  • Delete everything and paste the script source. I'll use YewChopper in this guide. (Link: parabot.org/community/index.php?/topic/704-ossedgeville-yew-chopperalpha/).
  • A red dot (an error), should now appear on the right side of the source. It's because our .class file name, doesn't match the script's class name. (Picture: puu.sh/1GoV8)
  • Click on the red dot and hover over the error. There should now be 2 fixes avaliable. Click on the first one. (Picture: puu.sh/1GoWn)
  • The error should be gone now and you can now save the script! Save it.

Adding the script.

  • Go to your workspace. If you selected your desktop, there should now be a new folder on your dekstop with the name of your java project. Open it.
  • Inside of it, there should be a bin folder. Open the bin folder and - bam! There's the compiled source files. Move them into /YourAccount/Documents/Parabot/Compiled/ and run parabot!

Thank you for reading my guide.

I hope that you've successfully compiled and imported the script files!

If you have any questions, feel free to post below or PM me.

rep_up.png if you liked the guide.

I do not have the compiled folders and that part is where it confuses me. 

 

EDIT: I found the compiled folders through the scripts, but what do I exactly put there? the bin folder or the items inside it?

Share this post


Link to post
Share on other sites

Soarin, on 15 Feb 2013 - 06:33, said:

 

I do not have the compiled folders and that part is where it confuses me. 

 

EDIT: I found the compiled folders through the scripts, but what do I exactly put there? the bin folder or the items inside it?

 

You put them in the compiled folder.

Share this post


Link to post
Share on other sites

Zubei, on 11 Feb 2013 - 01:09, said:

Every time I try to open eclipse.exe, I get: "Failed to load the JNI shared library "C:Program Files (x86)Javajdk1.6.0bin..jrebinclientjvm.dll"

 

Halp please

 

Re-download eclipse.

Share this post


Link to post
Share on other sites

Do you think you could help me? I got through all the steps up to the very last one where you have to move your compiled source files into the parabot file. I have my compiled sources:

 

2iqcxu9.png

 

 

But this is whats in my Parabot file, I'm not sure exactly what to do:

 

 

keet8m.png

Share this post


Link to post
Share on other sites

×