[solved] Problem Compiling Makelangelo in Eclipse

Shop Forum Makelangelo Polargraph Art Robot [solved] Problem Compiling Makelangelo in Eclipse

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #6067
    Anonymous
    Inactive

    Running Eclipse IDE for Java Developers, Version 4.4.1, Java 1.7

    First time with Eclipse (and Java). Was trying to compile the most up to date version and I’m coming up against an exception error. Has anyone had this error or know of this issue?

    I try to run “src.Makelangelo” and it reports in the console:

    Exception in thread “main” java.lang.NoClassDefFoundError: KeyEvent
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
    at java.lang.Class.getMethod0(Unknown Source)
    at java.lang.Class.getMethod(Unknown Source)
    at sun.launcher.LauncherHelper.getMainMethod(Unknown Source)
    at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
    Caused by: java.lang.ClassNotFoundException: KeyEvent
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    … 6 more

    #6884
    Anonymous
    Inactive

    More details. The investigation (and education) continues!

    The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files DrawingTool.java
    /Makelangelo/src/DrawingTools line 1
    Java Problem

    #6885
    Anonymous
    Inactive

    Well it turns out I didn’t have the full JDK installed or the jssc library. So simple!

    Leaving this here to start off the folder,

    In Eclipse, JDK and the jssc library (https://code.google.com/p/java-simple-serial-connector/) must be provided to compile.

    #6886
    Anonymous
    Inactive

    So you’re up and running now?

    Can you write a quick tutorial so others can follow your steps, please?

    #6887
    Anonymous
    Inactive

    To Run The Project In Eclipse

    Download:

    Steps:

      Install the JDK, then Eclipse
      In Eclipse, note your Workspace location on first startup and move “jssc-2.8.0.jar” to this folder.

      Navigate to Window > Preferences > Java > Installed JREs.
      If “jre…” is installed rather than “jdk…”, select Add > Standard VM and locate your JDK install. The other fields should fill in automatically.
      Checkmark “jdk…” in the Installed JREs pane to select as default.

      Choose File > Import > General > Existing Projects into Workspace and select Next.
      Choose Browse next to Select root directory and select the root folder of your “Makelangelo-master” download/clone from Github.
      Eclipse will scan the folder and find the project. Choose Finish.

      In the Package Explorer on the left, navigate to the Makelangelo project’s Properties > Java Build Path > Libraries.
      Remove any entries currently attached.
      Select Add Library > JRE System Library > Workspace default JRE, and it should select the JDK we set up.
      Select Add External JARs and navigate to your Workspace folder. Select “jssc-2.8.0.jar” to add it to your project.

      Makelangelo > Run As > Java Application
      Makelangelo should run!

    Reply for any questions. Dan, feel free to copy this or move it wherever it will be most helpful!

    #6883
    Anonymous
    Inactive

    I’m going to add this to the github Wiki for developers

    What…what are you going to do now? Anything I can do to explain the layout of the code and make it less confusing?

    #6888
    Anonymous
    Inactive

    Right now I’m just creating a workflow between processing, inkscape/illustrator, cambam, and the makelangelo. As soon as I start actually dabbling in the makelangelo code I’ll let you know!

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.