Using Processing in another editor (Java)

Hi, First off thank you very much for all the materials associated with processing it has been a great learning tool.
Q: I started with p5.js and I could import it into other editors pretty easily(thanks to the coding train video). I am now learning Java and would love to do the same thing but I can not seem to figure out how to import it. Is there an easy way to do this or a video tutorial of how?

Thank you for your time.

1 Like

in p5.js your code is a

sketch.js

file,
in Processing IDE JAVA Mode your code is in a

mySketch.pde

file

both are ASCII and editable by many editors.
insofar i question your wording you IMPORT something.


but possibly you want to talk about the project handling by IDE’s
other than Processing 3.5.3

also: this is a forum about Processing language AND Processing IDE
so the support of other IDE will be limited ( might be better to ask at their forum )
but you can get lucky to find someone here who is using the same tool like you

so i wonder why you ?avoid? naming the

you are now used to.


also please be aware that other tools/editors might have some NICE things

  • code folding
  • code block coloring

what currently are not available with processing IDE
you can expect that they will have disadvantages like reduced support

  • help
  • examples
  • libraries management
  • error handling
  • project management / save as / archive /

so:
please start with the Processing IDE now
and in 2 month, when you know that IDE ( and Processing JAVA ) better,
you can start again with working via a external IDE.

3 Likes

I am newish and had a question so I came to the forums. However first I searched the help, faq and forums for what I was looking for after not finding it I simply asked. If you are just going to be a jerk why are you posting on this thread at all? Basically nothing you said was helpful.

The other editors I have been using are brackets, vim, atom, sublime, and a little notepad++. Mainly just to get a feel for the differences and figure out which one I like the best. I also used codepen quite a bit while doing p5.js projects. So far I like using the processing environment the most.

Maybe my question was not clear. All I did to enable p5.js while using other editors was to download a file and/or attach a link using a small bit of code. I want to do the same thing with the java version but can not seem to find the info how. Being new I am aware this is probably very simple for someone who knows how but I do not and that is why I asked.

import java.awt.GraphicsEnvironment;

I have used other java libraries in some of my projects before that is why I used the word “import”.
Hoping maybe it was that simple.

import java.awt.processing;

or some such thing.

sorry i not understand your question and could not help

1 Like

Welcome to the forum. Very glad you are enjoying Processing and found the materials helpful.

Please don’t be rude to volunteers who try to help you, even if they could not solve your problem. Please also note that not all forum members speak English as a first language–misunderstandings are easy, especially tone.

Regarding your questions:

  1. p5.js is a JavaScript library.
  2. Processing (Java mode) is either:
    • written in the processing dialect and transpiled to Java 8, or
    • imported as a Java library into a Java project, and written in Java

If you want a native Processing (Java) IDE, use PDE, as kll suggested–it sounds like you are already using it, although I couldn’t tell from your initial post. Many new p5.js users skip PDE and use the online web editor or Brackets.

If you want to use one of the editors you are familiar with, first install PDE, then install a package for that editor.

These generally access PDE via the command line to do sketch compiling and launching–see for example the Atom installation instructions. Notice that, because Processing is a transpiled dialect, the syntax highlighting / code hinting / etc. is usually not as robust outside PDE (as kll mentioned).

If instead you want to write Processing (Java) sketches in Java, then you should use Eclipse, IntelliJ, or NetBeans – a full Java IDE. To get started, see for example the tutorial: https://processing.org/tutorials/eclipse/. This is more ambitious, but there are certain things you can only do in this way – in particular, authoring PDE contributed libraries or tools.

Hope this was helpful.

5 Likes

That was very helpful thank you.

1 Like