Results 1 to 13 of 13
  1. #1
    davetheant is offline Member
    Join Date
    Sep 2010
    Posts
    47
    Rep Power
    0

    Default Help using somone's documentation

    Hello everyone. I was wondering how to import someone else's documentation (the one in particular is located here: Robot (Abbot Documentation)). How would I do this? Thanks in advance.

  2. #2
    goldest's Avatar
    goldest is offline Senior Member
    Join Date
    Oct 2009
    Location
    Pune, India
    Posts
    469
    Rep Power
    6

    Wink

    What do you exactly mean about "importing documentation" ?

    Do you want to get all the javadoc API stored on that webpage? or something else? Would you please elaborate a bit?

    Goldest
    Java Is A Funny Language... Really!
    Click on * and add to member reputation, if you find their advices/solutions effective.

  3. #3
    davetheant is offline Member
    Join Date
    Sep 2010
    Posts
    47
    Rep Power
    0

    Default

    I just want to use the methods listed at the link in my code.

  4. #4
    goldest's Avatar
    goldest is offline Senior Member
    Join Date
    Oct 2009
    Location
    Pune, India
    Posts
    469
    Rep Power
    6

    Wink

    Abbot seems to be a separate framework all together for specific GUI needs.

    If you want to use that, you can download the source code zip file from here, that contains the source and required library jar files to make the things work.

    You can put that jar files in your class path or from where you can refer to them and you are good to go.

    Goldest
    Java Is A Funny Language... Really!
    Click on * and add to member reputation, if you find their advices/solutions effective.

  5. #5
    davetheant is offline Member
    Join Date
    Sep 2010
    Posts
    47
    Rep Power
    0

    Default

    Thanks a lot, now one last question: I'm unsure as to what I am supposed to do with the contents of this zip file. Is there a specific file I am supposed to take out for the Robot class? Or do I just dump everything in my JDK/JRE folder?

  6. #6
    goldest's Avatar
    goldest is offline Senior Member
    Join Date
    Oct 2009
    Location
    Pune, India
    Posts
    469
    Rep Power
    6

    Wink

    That zip file would most probably contain a directory named "lib". In that directory you will find many jar files. These jar files actually contain the class files of the source code i.e. the features you would like to use.

    So what you have to do is, either put all those jar files in your class path or check out the jar file contents and place only the jar files that you need in your class path.

    For e.g. there is one abbot.jar in the lib folder. Inside its directory structure it contains the Robot.class file with structure abbot\tester\Robot.class. So if you want to use Robot class features, put the abbot.jar in your class path. Same for other things...

    Hope you are clear enough,

    Goldest
    Java Is A Funny Language... Really!
    Click on * and add to member reputation, if you find their advices/solutions effective.

  7. #7
    davetheant is offline Member
    Join Date
    Sep 2010
    Posts
    47
    Rep Power
    0

    Default

    Thanks a lot. Now I know this is a noob question but where is the Classpath I'm supposed to put it in? I ran "echo %CLASSPATH%" in cmd and it directed me to a zip file in my JRE. There are some other jar's in that folder, so I put abbot.jar with it, but the compiler tells me abbot does not exist as a package.

  8. #8
    goldest's Avatar
    goldest is offline Senior Member
    Join Date
    Oct 2009
    Location
    Pune, India
    Posts
    469
    Rep Power
    6

    Wink

    Do you use an IDE like eclipse?

    If that's the case, you can simply right click on your project and go to Build Path -> Configure Build Path -> Library and say "Add External JARs". Add your abbot.jar here from your file system.

    In your java code, simply import the abbot structure and you are done.

    This is what I tried just now,


    Java Code:
    import abbot.tester.Robot;
    
    public class AbbotTest {
    	public static void main(String args[]) {
    		Robot r = new Robot();
    		System.out.println("Robot Successful");
    	}
    }
    And the output is Robot Successful. It works dude! :D

    Hope that's clear now,

    Goldest
    Java Is A Funny Language... Really!
    Click on * and add to member reputation, if you find their advices/solutions effective.

  9. #9
    davetheant is offline Member
    Join Date
    Sep 2010
    Posts
    47
    Rep Power
    0

    Default

    I got it thanks. We can say your rep = rep++; lol

    edit: It seems that since java.awt.Robot and abbot.tester.Robot end with the same name, they both can not be imported. Is this true?
    Last edited by davetheant; 01-07-2011 at 02:19 PM.

  10. #10
    goldest's Avatar
    goldest is offline Senior Member
    Join Date
    Oct 2009
    Location
    Pune, India
    Posts
    469
    Rep Power
    6

    Wink

    In case if you use command prompt,

    Suppose that your abbot.jar is in D:\Downloads\abbot-1.0.2\lib\abbot.jar And the code file is in D:\dell\Robot\AbbotTest.java directory.

    In that case you need to provide the classpath to your abbot.jar file on the command line.


    Compile by,
    Java Code:
    D:\dell\Robot>javac -cp D:\Downloads\abbot-1.0.2\lib\abbot.jar AbbotTest.java
    Run by,
    Java Code:
    D:\dell\Robot>java -cp D:\Downloads\abbot-1.0.2\lib\abbot.jar;. AbbotTest
    Which would produce,
    Java Code:
    Robot Successful
    Hope that's clear,

    Goldest
    Java Is A Funny Language... Really!
    Click on * and add to member reputation, if you find their advices/solutions effective.

  11. #11
    goldest's Avatar
    goldest is offline Senior Member
    Join Date
    Oct 2009
    Location
    Pune, India
    Posts
    469
    Rep Power
    6

    Wink

    Quote Originally Posted by davetheant View Post
    I got it thanks. We can say your rep = rep++; lol
    LOL :D

    Quote Originally Posted by davetheant View Post
    edit: It seems that since java.awt.Robot and abbot.tester.Robot end with the same name, they both can not be imported. Is this true?
    In that case you can use the other Robot this way to avoid naming collision,
    Java Code:
    java.awt.Robot r1 = new java.awt.Robot();
    Hope thats clear,

    Goldest
    Java Is A Funny Language... Really!
    Click on * and add to member reputation, if you find their advices/solutions effective.

  12. #12
    davetheant is offline Member
    Join Date
    Sep 2010
    Posts
    47
    Rep Power
    0

    Default

    I got everything worked out. The problem was that I had to use java.awt.Robot because I imported abbot's Robot first. Thanks again.

  13. #13
    goldest's Avatar
    goldest is offline Senior Member
    Join Date
    Oct 2009
    Location
    Pune, India
    Posts
    469
    Rep Power
    6

    Wink

    You are Welcome.

    Nice to know that everything got resolved. All well, that ends well. :D

    Goldest
    Java Is A Funny Language... Really!
    Click on * and add to member reputation, if you find their advices/solutions effective.

Similar Threads

  1. Making Documentation
    By Adam Cruge in forum New To Java
    Replies: 6
    Last Post: 04-11-2009, 08:02 PM
  2. min / max and documentation
    By jon80 in forum New To Java
    Replies: 1
    Last Post: 04-20-2008, 01:37 PM
  3. documentation
    By mcal in forum New To Java
    Replies: 4
    Last Post: 02-07-2008, 07:20 AM
  4. Java Documentation
    By ravian in forum New To Java
    Replies: 4
    Last Post: 12-04-2007, 10:45 AM
  5. QueueMetrics 1.4 (Documentation)
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 06-29-2007, 01:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •