Skip to content

Conversation

@joelmoniz
Copy link

This PR fixes #3. The primary change is that the jars in the processing/java/mode folder, especially JavaMode.jar, need to be included in the mode's "lib" directory. This is because in 3.0, unlike previously, the JavaMode itself is loaded as a contributed mode, and isn't in Processing's classpath. Which means that if the JavaMode.jar isn't included, the class loader trying to load the mode has no idea what exactly JavaMode.jar is (since JavaMode.jar isn't in processing's classpath).

Further, how the mode's class loader identifies the class loader to be returned (i.e., JavaMode's class loader) also has to be changed- earlier, it could just cycle through all the modes and find which one of them corresponded to the JavaMode.class. However, now, since the JavaMode.class of the mode is not the same as the JavaMode's JavaMode.class (since they're loaded from different jars), it has to identify the JavaMode by name, and then return its class loader.

Once these 2 changes are made, everything runs smoothly. I've updated the resources/theme folder as well, since otherwise, the UI looks terribly off, as quite a few UI changes were made in 3.0.
And finally, I've updated the readme to mention that the jars in the processing/java/mode folder have to be included in the "lib" folder.

A huge thank you to @Manindra29 for helping me figure out all these changes that needed to be done.

@arypbatista
Copy link

arypbatista commented Jul 15, 2016

@martinleopold Please, merge this pull request.

Or @joelmoniz proceed to create your own repository with this update so people interested will follow your updated version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update TemplateMode to ensure compatibility with 3.0

2 participants