Changes between Version 1 and Version 2 of DevelopersGuide/EclipseTips


Ignore:
Timestamp:
2012-07-25T22:59:55+02:00 (13 years ago)
Author:
mrwojo
Comment:

added troubleshooting for a mistake I've made twice now when compiling JOSM plugins

Legend:

Unmodified
Added
Removed
Modified
  • DevelopersGuide/EclipseTips

    v1 v2  
    1313Just in case I'm not the only eclipse noo :)
    1414
    15 Eclipse support "live code editing" while debugging, meaning that you can make changes to the code, and they will be compiled and "inserted" into the application being debugged. Somewhat surprisingly ([http://josm.openstreetmap.de/ticket/6396 too me at least]) this works more or less for plugins too. At least if the plugin and JOSM project are open in the same eclipse workspace, and the plugin has JOSM as a required project.
     15Eclipse supports "live code editing" while debugging, meaning that you can make changes to the code, and those changes will be compiled and "inserted" into the application being debugged. Somewhat surprisingly ([http://josm.openstreetmap.de/ticket/6396 to me at least]) this works more or less for plugins too. At least if the plugin and JOSM project are open in the same Eclipse workspace, and the plugin has JOSM as a required project.
     16
     17== Troubleshooting version errors ==
     18Are you getting this error while compiling from ant?
     19
     20{{{java.lang.UnsupportedClassVersionError: com/sun/tools/javac/Main : Unsupported major.minor version 51.0}}}
     21
     22If so, it probably means that your `javac` is from JDK 7 yet you are trying to execute it in a Java 6 runtime environment. It's an easy mistake to make in Eclipse when switching between JRE versions for JOSM.
     23
     24Check: build.xml > Properties > Run/Debug Settings > (Select or create a launch configuration) > JRE. Make sure ant is launching with the same JRE as the JDK version you have installed. Note that this is simply the JRE used when launching ant/javac, it's not the output version of the .class files.