DEBUG key: /en
DEBUG locale: sr
DEBUG target: /en/en
🇬🇧 EnglishThis site is dedicated to creating computer simulations in physics using various programming tools—including Java and JavaScript—with a special focus on Processing and the Easy JavaScript Simulation (EJS) tool.
Easy JavaScript Simulation (EJS) is an open-source tool, part of the Open Source Physics project, designed to simplify the creation of interactive, visual simulations with minimal coding. It’s ideal for physicists, students, and researchers.
We also cover the use of Easy JavaScript Simulation System (EJSS), another open-source component of the same project, which enables you to build simulations in JavaScript.
Whether you choose Java (file extension .ejs) or JavaScript (extension .ejss), EJS/EJSS lets you focus on physics rather than boilerplate code.
Java-based simulations require a Java Virtual Machine (JVM) installed on your computer (part of the Java Runtime Environment or JDK). In contrast, JavaScript applets run in virtually any modern browser—on desktop, Android, or iOS—without additional installation.
Visit Svet programiranja to explore how Java and the OSP library facilitate the creation of interactive simulations that aid in understanding complex physical phenomena.
To start, download the latest EJS version and explore our tutorial library.
For more Java programming resources, visit Svet programiranja.
The Java language with the OSP (Open Source Physics) library enables advanced simulation creation. Java simulations (.ejs) allow fine control over physics, while minimizing boilerplate code.
If you are comfortable programming in Java and prefer IDEs like Eclipse, you can use standard Java libraries (e.g., javax.swing) to build custom simulation apps or even 2D/3D games.
Read more on: Java and simulations in physics.
This simulation is built with JavaScript and the p5.js library.
Looking for a Processing/Java version? See our projectile motion in Processing tutorial.
This simulation is created with JavaScript and p5.js.
Learn how to build it in Processing/Java: Processing projectile motion.