A library for IDEs and Code Editors to compile java projects faster dynamically

Overview

fast-java-dynamic-compiler

A library for IDEs and Code Editors to compile java projects faster dynamically.

Usage

Note that the project, that is to be compiled dynamically, must have already been compiled at least once!

All you need to do is call JavaDynamicCompiler.fastCompile.

files = new LinkedList<>(); files.add(new File("/home/ubuntu/Documents/Omega Projects/Test Dynamic Compiler/src/test/TestFile.java")); files.add(new File("/home/ubuntu/Documents/Omega Projects/Test Dynamic Compiler/src/test/TestDependentFile.java")); String[] classpath = new String[]{"/home/ubuntu/Downloads/jediterm.jar", "/home/ubuntu/Downloads/dependency.jar"}; DiagnosticCollector diagnostics = JavaDynamicCompiler.fastCompile(projectPath, classpath, files); diagnostics.getDiagnostics().forEach(System.out::println); } }">
package test;
import java.io.File;

import javax.tools.DiagnosticCollector;
import javax.tools.JavaFileObject;

import java.util.LinkedList;

import omegaui.dynamic.compiler.JavaDynamicCompiler;

public class DynamicCompilerTest {
	
	public static void main(String[] args){
		String projectPath = "/home/ubuntu/Documents/Omega Projects/Test Dynamic Compiler";

		LinkedList<File> files = new LinkedList<>();
		files.add(new File("/home/ubuntu/Documents/Omega Projects/Test Dynamic Compiler/src/test/TestFile.java"));
		files.add(new File("/home/ubuntu/Documents/Omega Projects/Test Dynamic Compiler/src/test/TestDependentFile.java"));

		String[] classpath = new String[]{"/home/ubuntu/Downloads/jediterm.jar", "/home/ubuntu/Downloads/dependency.jar"};
		
		DiagnosticCollector<JavaFileObject> diagnostics = JavaDynamicCompiler.fastCompile(projectPath, classpath, files);
		diagnostics.getDiagnostics().forEach(System.out::println);
	}
	
}

files is the list of files that have changed contents since last compilation, thus, recompiling only the changed files.

The above code will compile and generate the .class files in bin directory of the project.

You might also like...

JHook - A tool that can dynamically modify Java classes at runtime.

JHook A tool that can dynamically modify Java classes at runtime. Demo Tested on Java 1.8 - Java 17, just support JDK package com.binklac.jhook.test;

Dec 23, 2022

Dynamically inline MethodHandles

HandleWrapper MethodHandles can be as fast as direct invocation, as long as they are static final fields. Then they can be inlined. But what if we wan

Aug 10, 2022

A plugin for the ja-netfilter, it can replace strings dynamically.

plugin-mymap A plugin for the ja-netfilter, it can replace strings dynamically. Use the mvn clean package command to compile and use mymap-v1.0.1-jar-

Dec 12, 2022

Catch common Java mistakes as compile-time errors

Error Prone Error Prone is a static analysis tool for Java that catches common programming mistakes at compile-time. public class ShortSet { public

Dec 31, 2022

Catch common Java mistakes as compile-time errors

Error Prone Error Prone is a static analysis tool for Java that catches common programming mistakes at compile-time. public class ShortSet { public

Dec 31, 2022

Download compiled jar from packages or compile it by yourself from sources

Download compiled jar from packages or compile it by yourself from sources

idle_codes Install Download compiled jar from packages or compile it by yourself from sources Put the jar file wherever you want. Make sure you have J

Dec 31, 2021

RestAhead - compile time generated REST client

RestAhead - compile time generated REST client This project draws inspiration from projects such as Retrofit and Feign, but with a twist: your service

Dec 24, 2022

Table-Computing (Simplified as TC) is a distributed light weighted, high performance and low latency stream processing and data analysis framework. Milliseconds latency and 10+ times faster than Flink for complicated use cases.

Table-Computing Welcome to the Table-Computing GitHub. Table-Computing (Simplified as TC) is a distributed light weighted, high performance and low la

Oct 14, 2022

Simpler, better and faster Java bean mapping framework

Simpler, better and faster Java bean mapping framework

Orika ! NEW We are pleased to announce the release of Orika 1.5.4 ! This version is available on Maven central repository What? Orika is a Java Bean m

Jan 6, 2023

A Minecraft Mod for Fabric which aims to make Block Entity rendering faster and more customizable with almost no compromises.

A Minecraft Mod for Fabric which aims to make Block Entity rendering faster and more customizable with almost no compromises.

Enhanced Block Entities EBE is a 100% client side mod for Minecraft on the Fabric mod loader which aims to increase the performance of block entity re

Dec 30, 2022

Caches datapack- and server resources to make world creation faster.

antiresourcereload Caches datapack- and server resources to make world creation faster. Legalisation Status Legal (1.0.2) Description I found out abou

Nov 18, 2022

GraalVM: Run Programs Faster Anywhere :rocket:

GraalVM GraalVM is a universal virtual machine for running applications written in JavaScript, Python, Ruby, R, JVM-based languages like Java, Scala,

Jan 9, 2023

GraalVM: Run Programs Faster Anywhere :rocket:

GraalVM GraalVM is a universal virtual machine for running applications written in JavaScript, Python, Ruby, R, JVM-based languages like Java, Scala,

Jan 5, 2023

An open source SQL database designed to process time series data, faster

An open source SQL database designed to process time series data, faster

English | 简体中文 | العربية QuestDB QuestDB is a high-performance, open-source SQL database for applications in financial services, IoT, machine learning

Jan 1, 2023

A Minecraft Fabric mod to make crafting with the recipe book faster

OneClickCrafting This mod is clientside only. After selecting a recipe in the recipe book, the client with shift-click the crafted item from the resul

Jun 2, 2022

Terse. Elegant. Readable. Even faster.

Myxal Terse. Elegant. Readable. Even faster. A top secret experiment to make Jyxal even faster and multitarget compiled. How to run Download the lates

May 30, 2022

Team 2539's Java training, consisting of a series of projects that combine into a full robot code base.

Java Training Part 1 - Learning Java (Skip this part if you have taken AP Comp Sci) For learning Java, we currently recommend using codecademy, but mo

Aug 24, 2022

100+ Spring Boot Articles, Tutorials, Video tutorials, Projects, Guides, Source code examples etc

YouTube Channel - Spring Boot Tutorial Subscribe for future video and updates Spring Boot Tutorial on YouTube Newly published spring boot tutorials (2

Jan 2, 2023
Owner
omega ui
Adding Feathers to Development
omega ui
Vim emulation plugin for IDEs based on the IntelliJ Platform

IdeaVim IdeaVim is a Vim emulation plugin for IntelliJ Platform-based IDEs. Contact maintainers: Bug tracker @IdeaVim on Twitter Chat on gitter Unoffi

JetBrains 7.1k Jan 5, 2023
Tiger language plugin for IntelliJ-based IDEs (including CLion)

Tiger IDEA Tiger language plugin for IntelliJ-based IDEs (including CLion). From the marketplace Search "Tiger" in the Preferences => Plugins section

Adrien Navratil 7 Dec 15, 2022
An object mapping jetbrains plugin, it will automatically generate the get/set code between the two objects.

BeanMappingKey 简体中文 | English 一键生成两个实体类之间的字段映射代码,用于代替 BeanUtil 与 MapStruct 等工具。 使用指南 在 Java 开发的过程中,经常会使用众多包装型的对象如:BO、VO、DTO,它们之间往往只有两三个字段的差异, 而对它们进行相互

Rookie 60 Dec 14, 2022
MIPS Assembler and Runtime Simulator

MIPS Assembler and Runtime Simulator MARS fork (?) cleaned up and gradleized so that I can hopefully build an .exe and install it properly. Also added

null 2 Sep 29, 2021
Compile Java byte-code to native CPU's.

Java Grinder Compile Java bytecode to microcontroller assembly. Currently supporting MSP430, dsPIC, 6502/6510, 68000, MIPS, TMS9900, and Z80 with plat

Michael Kohn 396 Dec 23, 2022
A plugin to add Silverstripe template support to PHPStorm and other JetBrains IDEs.

Idea Silverstripe Plugin ⚠️ Work in progress ⚠️ This plugin adds Silverstripe template support to PHPStorm and other JetBrains IDEs. Platform requirem

Loz Calver 25 Sep 27, 2021
Java related projects and also a begginer level projects

Java related projects and also a begginer level projects

Akshit Sijwali 3 Dec 15, 2022
Vim emulation plugin for IDEs based on the IntelliJ Platform

IdeaVim IdeaVim is a Vim emulation plugin for IntelliJ Platform-based IDEs. Contact maintainers: Bug tracker @IdeaVim on Twitter Chat on gitter Unoffi

JetBrains 7.1k Jan 5, 2023
Tiger language plugin for IntelliJ-based IDEs (including CLion)

Tiger IDEA Tiger language plugin for IntelliJ-based IDEs (including CLion). From the marketplace Search "Tiger" in the Preferences => Plugins section

Adrien Navratil 7 Dec 15, 2022
Dynamically filters JPA entities with a simple query syntax. Provides JPA/Hibernate predicates and Spring Data specifications.

Spring Filter You need a way to dynamically filter entities without any effort? Just add me to your pom.xml. Your API will gain a full featured search

Turkraft 142 Dec 13, 2022