Reading source code from GitHub

Discussion in 'Plugin Development' started by SiezureSalad, Apr 13, 2017.

Thread Status:
Not open for further replies.
  1. Offline

    SiezureSalad

    Hey I've recently taken a long break from coding and forgotten how to do this. I'd like to read this guy's source code and edit it for my specific server is there any way of downloading it and having it in eclipse?

    https://github.com/sainttx/Auctions
     
  2. Offline

    timtower Administrator Administrator Moderator

    @SiezureSalad I would use the big green download button on the top right.
     
  3. Offline

    SiezureSalad

    Done that lol :p
    Wasn't sure how to open the whole thing in eclipse though. I put it in the workspace but it didn't really do anything.
     
  4. Offline

    timtower Administrator Administrator Moderator

    @SiezureSalad That is because you need to create a project out of it.
    Original developer didn't include those files.
     
  5. Offline

    SiezureSalad

    Is there any way for me to read the code then? Will I need to compile it?
     
  6. Offline

    timtower Administrator Administrator Moderator

    Reading the code: github, open the folder with explorer, open the java files with notepad.
    Compiling it: make a project, drag the source in.
     
  7. Offline

    SiezureSalad

    Thanks for your help this far. I got it working to some extent - the src is in there and I can view all the .java 's in that src. Problem is it declares a package but it doesn't like it at all, it says this error:
    Code:
    The declared package "com.sainttx.auctions" does not match the expected package "main.java.com.sainttx.auctions"
    the package it is in is main.java.com.sainttx.auctions
    and the line of code itself is
    Code:
    package com.sainttx.auctions;
    Could this be because I have no added the API that comes with it? If so I'm not sure how I would go about it since it came in a folder called AuctionsAPI with a src, not a jar and a javadoc.
     
  8. Offline

    timtower Administrator Administrator Moderator

  9. Eclipse has problems with packages inside of packages.
     
Thread Status:
Not open for further replies.

Share This Page