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

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 server provider file. They can be downloaded here. (Picture: puu.sh/5F0sV.png). 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/scripts/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

Share this post


Link to post
Share on other sites

If your script doesn't have a Compiled & Sources folder, create them yourself.

Updating thread asap, but I'm on mobile now

I'm not good in this, but how to create one? You need a Compiled.bat file rite?

Share this post


Link to post
Share on other sites

I'm not good in this, but how to create one? You need a Compiled.bat file rite?

Uhm.. To create a folder, you right click and select New --> Folder.

I assume that's what's you asked for, since you quoted my reply.

Share this post


Link to post
Share on other sites

Uhm.. To create a folder, you right click and select New --> Folder.

I assume that's what's you asked for, since you quoted my reply.

Then it doesnt work, I put all the class files in that folder but it won't work..

Share this post


Link to post
Share on other sites

On step number 6 I can not find java build path. Can someone please show me where it would be?

gyazo(.)com/14af334596c290a50ddce325addf2b4f << Its a picture website just like puu.sh

Share this post


Link to post
Share on other sites

On step number 6 I can not find java build path. Can someone please show me where it would be?

gyazo(.)com/14af334596c290a50ddce325addf2b4f << Its a picture website just like puu.sh

You have to right click on the folder inside of eclipse.

Share this post


Link to post
Share on other sites

×