zoukankan      html  css  js  c++  java
  • Processing in Eclipse

    This article is the summary of http://processing.org/learning/eclipse/

    0. Environment

    Windows XP sp3

    1.Steps

    1.1 Install Java(JDK)

    1.2 Install Processing

    1.3 Download and install Eclipse

    1.4 Create a new Java project

    FILE --> NEW PROJECT and select "Java Project." Click next. Enter your project name (for example, "TestProcessing") and select "Finish."

    1.5 Import the Processing libraries

    FILE --> IMPORT --> GENERAL --> FILE SYSTEM
    --> browse and find the Processing application, look inside the directory called "lib" --> Select the file "core.jar" --> FINISH
    --> Right-click on the file and select --> BUILD PATH --> ADD TO BUILD PATH

    1.6 Create a class and write your code

    Create a class "MyProcessingSketch"
    ////////////////////////////////////////////////////////////
    import processing.core.*;
    public class MyProcessingSketch extends PApplet
    {
      public void setup()
      {
        size(200,200);
        background(0);
      }
      public void draw()
      {
        stroke(255);
        if (mousePressed)
        {
          line(mouseX,mouseY,pmouseX,pmouseY);
        }
      }
    }

    ////////////////////////////////////////////////////////////

    1.7 Run as Java Application

    ////////////////////////////////////////////////////////////

      public static void main(String args[])
      {
        PApplet.main(new String[] { "--present", "MyProcessingSketch" });
      }

    ////////////////////////////////////////////////////////////

    Note that the String "MyProcessingSketch" must match the name of your class (and if it is in a package, should include the package, i.e. packagename.MyProcessingSketch).

    2. Reference

    http://processing.org/learning/eclipse/

  • 相关阅读:
    redhat 7.6 常用命令
    redhat 7.6 VI编辑操作
    redhat 7.6 网络配置
    华为学习配置笔记-01 配置con密码
    redhat 7.6 ssh 服务配置
    web前端面试第一次[addEventListenr();绑定事件]
    redis集群搭建
    linux服务器重启后redis数据丢失问题
    redis日志文件路径的设置
    linux下redis安装使用
  • 原文地址:https://www.cnblogs.com/chenyineng/p/2669768.html
Copyright © 2011-2022 走看看