User Tools

Site Tools


how_to_install_the_library_in_eclipse

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
how_to_install_the_library_in_eclipse [2023/08/26 11:31] frchrishow_to_install_the_library_in_eclipse [2023/08/26 11:51] (current) frchris
Line 4: Line 4:
   - In the ''JRE'' area, select '' use an execution environment JRE J2SE-1.5''     - In the ''JRE'' area, select '' use an execution environment JRE J2SE-1.5''  
   - In the ''Project Layout'' area, select ''Use project folder as root for sources and class files''   - In the ''Project Layout'' area, select ''Use project folder as root for sources and class files''
-  - Uncheck ''create module-info java file.+  - Uncheck ''create module-info'' java file.
   - Press the ''Finish'' button, even if you don't speak Finnish.   - Press the ''Finish'' button, even if you don't speak Finnish.
   - Now right-click the new Project and select ''Preferences'' at the bottom (or press ''Alt-Enter'' or press''Command-I'' on a mac or ''Control-I'' on Windows)   - Now right-click the new Project and select ''Preferences'' at the bottom (or press ''Alt-Enter'' or press''Command-I'' on a mac or ''Control-I'' on Windows)
Line 10: Line 10:
   - Click once on the third tab called ''Libraries''   - Click once on the third tab called ''Libraries''
   - Click the second button down called ''Add External JARs''   - Click the second button down called ''Add External JARs''
-  - Place the ''KarelJRobot.jar'' file you downloaded earlier into your new project folder (Do this using ''Finder'' in Mac or ''Files'' on Windows) +  - Place the ''KarelJRobot.jar'' file you downloaded earlier into your new project folder (Do this using ''Finder'' on Mac or ''Files'' on Windows) 
   - Go back to eclipse and select the ''KarelJRobot.jar'' file you just dropped into the project folder.   - Go back to eclipse and select the ''KarelJRobot.jar'' file you just dropped into the project folder.
   - Press the ''Open'' button   - Press the ''Open'' button
   - Press the ''Apply and Close'' button   - Press the ''Apply and Close'' button
-  - Make a new class ''RobotRunner'' to test it out: From the File menu, select ''New -> Class'' (or press the ''C+'' button. ) and name class ''RobotRunner'' Paste the follwing code:+  - Make a new class ''RCRunner'' to test it out: From the File menu, select ''New -> Class'' (or press the ''C+'' button. ) and name class ''RCRunner'' Paste the follwing code:
 <code java> <code java>
 +  import java.awt.Color;
   import kareltherobot.*;   import kareltherobot.*;
-  public class RobotRunner implements Directions +  public class RCRunner implements Directions { 
-  +  
- public static void main(String[] args)  + // Main entry point 
- + public static void main(String[] args) { 
- World.setDelay(150); +    World.setDelay(10);  
- World.placeBeepers(432); +           World.placeBeepers(211); 
- World.setVisible();+           World.setVisible(); 
 +           RemoteControl karel = new RemoteControl(3, 1, East, 3 , Color.RED);
  }  }
-  }+} 
 </code> </code>
how_to_install_the_library_in_eclipse.1693063889.txt.gz · Last modified: 2023/08/26 11:31 by frchris

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki