Micronaut Hello World Example
Learn how to create a simple “Hello, World!” application using the Micronaut framework
Learn how to create a simple “Hello, World!” application using the Micronaut framework
This article will show you how to create a simple "Hello World" application in JavaFX. Tested with Java 17 JavaFX 17.0.6 Maven 3 Table of Contents 1. Project Directory 2. Maven Dependencies 3. JavaFX Hello World 4. Run JavaFX Hello World with Maven 5. Run JavaFX Hello World with Maven and IntelliJ IDEA 6. Download …
Get started with Spring Boot. A hello world web example with Maven, Java 25, and Spring Boot 4.
The below program launch a Java Swing application; It configures a JFrame and attach a JLabel to display a hello world and center the JLabel component. Read the comment for self-explanatory. SwingHelloWorld.java package com.mkyong.swing import javax.swing.*; import java.awt.*; public class SwingHelloWorld { public static void main(String[] args) { JFrame frame = new JFrame("Hello World Java …
This article shows how to create or scaffold a Gradle + Quarkus JAX-RS hello world project, which creates a /hello endpoint and returns a string. Technologies used: Quarkus 1.11.0 Gradle 6.7 Maven 3.6.3 Java 11 Topics Creating a new Gradle + Quartus project Gradle + Quarkus Project Structure Quarkus and build.gradle Quarkus Dependencies (runtimeClasspath) Quarkus …
This article shows how to use the quarkus-maven-plugin to create or scaffold a Maven + Quarkus JAX-RS hello world project. Technologies used: Quarkus 1.11.0 Maven 3.6.3 Java 11 Topics Creating a new Maven + Quartus project Maven + Quarkus Project Structure Quarkus and pom.xml Quarkus Dependencies Quarkus JAX-RX endpoint Quarkus and Dockerfile Run Quarkus in …
A Spring Boot web application example, using embedded Tomcat + Mustache template engine, and package as an executable JAR file. Technologies used : Spring Boot 1.5.2.RELEASE Spring 4.3.7.RELEASE jmustache 1.13 Thymeleaf 2.1.5.RELEASE Tomcat Embed 8.5.11 Maven 3 Java 8 Note Spring Boot uses jmustache to integrate Mustache as template engine. 1. Project Directory 2. Project …
Apache Solr is an Open-source REST-API based Enterprise Real-time Search and Analytics Engine Server from Apache Software Foundation. It’s core Search Functionality is built using Apache Lucene Framework and added with some extra and useful features. It is written in Java Language. SOLR stands for Searching On Lucene w/Replication. It’s main functionalities are indexing and …
ElasticSearch is an Open-source Enterprise REST based Real-time Search and Analytics Engine. It’s core Search Functionality is built using Apache Lucene, but supports many other features. It is written in Java Language. It supports Store, Index, Search and Analyze Data in Real-time. Like MongoDB, ElasticSearch is also a Document-based NoSQL Data Store. Note ElasticSearch website: …
In this article, we will show you how to develop a Spring Boot web application, using Thymeleaf view, embedded Tomcat and package it as an executable JAR file. Technologies used : Spring Boot 2.1.2.RELEASE Spring 5.1.4.RELEASE Thymeleaf 3.0.11.RELEASE Tomcat embed 9.0.14 JUnit 4.12 Maven 3 Java 8 1. Project Directory 2. Maven Put spring-boot-starter-web and …
A Spring Boot web application example, using embedded Tomcat + JSP template, and package as an executable WAR file. Technologies used : Spring Boot 1.4.2.RELEASE Spring 4.3.4.RELEASE Tomcat Embed 8.5.6 Maven 3 Java 8 1. Project Directory Create the following folders manually : 2. Project Dependencies Maven example. Read comments for self-explanatory. pom.xml <?xml version="1.0" …
In this tutorial, we will show you how to create a website with Meteor framework. Tools used : Meteor 1.2.1 Tested with Linux (Debian, Ubuntu or Mint) Tested with Mac OSX 1. Install Meteor Issue curl https://install.meteor.com | sh, everything will be installed and configured. $ curl https://install.meteor.com | sh % Total % Received % …
In this tutorial, we will show you how to create a Spring MVC web project and submit a form via Ajax. Technologies used : Spring 4.2.2.RELEASE Jackson 2.6.3 Logback 1.1.3 jQuery 1.10.2 Maven 3 JDK 1.8 Tomcat 8 or Jetty 9 Eclipse 4.5 Boostrap 3 P.S If the Jackson library is found in the project …
In this tutorial, we will show you how to use Ant build script to manage a Spring MVC web application project, create a WAR file and deploy to Tomcat. Technologies used : Eclipse 4.2 JDK 1.7 Ant 1.9.4 Ant-Ivy 2.4 logback 1.1.2 jstl 1.2 Spring 4.1.3.RELEASE Tomcat 7 1. Project Directory Review the final project …
This tutorial shows you how to create a Spring Web MVC application with the Jakarta Server Pages (JSP; formerly JavaServer Pages) template. Technologies and tools used: Java 11 Spring 5.2.22.RELEASE JSP JSTL 1.2 Servlet API 4.0.1 Bootstrap 5.2.0 (webjars) IntelliJ IDEA Gradle 7.5.1 Gradle Gretty plugin 3.0.9 for embedded servlet containers (Tomcat 9 and Jetty …
In this tutorial, we will show you how to use the classic log4j 1.2.x to log a debug or error message in a Java application. 1. Project Directory Review the final project structure, a standard Maven style Java project. 2. Get Log4j Declares the following dependencies : pom.xml <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.17</version> </dependency> For non-Maven …
In preview post, we are using XML files to configure the Spring Security in a Spring MVC environment. In this tutorial, we are going to show you how to convert the previous XML-base Spring Security project into a pure Spring annotation project. Technologies used : Spring 3.2.8.RELEASE Spring Security 3.2.3.RELEASE Eclipse 4.2 JDK 1.6 Maven …
A classic example, show you how to get started with TestNG unit test framework. Tools used : TestNG 6.8.7 Maven 3 Eclipse IDE 1. TestNG Dependency Add TestNG library in the pom.xml. pom.xml <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>6.8.7</version> <scope>test</scope> </dependency> 2. TestNG Example Review a simple class, has a method to return a fixed email “[email protected]”. …
Spring Batch is a framework for batch processing – execution of a series of jobs. In Spring Batch, A job consists of many steps and each step consists of a READ-PROCESS-WRITE task or single operation task (tasklet). For “READ-PROCESS-WRITE” process, it means “read” data from the resources (csv, xml or database), “process” it and “write” …
Jsoup, a HTML parser, its “jquery-like” and “regex” selector syntax is very easy to use and flexible enough to get whatever you want. Below are three examples to show you how to use Jsoup to get links, images, page title and “div” element content from a HTML page. Download jsoup The jsoup is available in …
A quick guide to show you how to do basic operations like create, update, find, delete record and indexing in MongoDB. This example is using MongoDB 2.0.7, running on Mac OS X 10.8, both MongoDB client and server console are run on localhost, same machine. 1. Install MongoDB Install MongoDB on Windows, Ubuntu or Mac …
In this tutorial, we will show you how to create a simple GAE hello world web project, using Python, on Mac OS X, and run it via Google App Engine Launcher. Tools used : Google App Engine SDK for Python (Mac OS X) – 1.7.0 Mac OS X 10.8 Python 2.7 Note By default, Mac …
In this tutorial, we will show you how to create a JSF 2 + PrimeFaces wed project, the final output is display a “hello world” string in PrimeFaces editor component. Tools used : JSF 2.1.11 Primefaces 3.3 Eclipse 4.2 Maven 3 Tested on Tomcat 7 Note PrimeFaces only requires a JAVA 5+ runtime and a …
In this tutorial, we will show you how to use Eclipse to create a Google App Engine (GAE) Python web project (hello world example), run it locally, and deploy it to Google App Engine account. Tools used : Python 2.7 Eclipse 3.7 + PyDev plugin Google App Engine SDK for Python 1.6.4 P.S Assume Python …
In this tutorial, we will show you how to use Eclipse to create a Google App Engine (GAE) Java project (hello world example), run it locally, and deploy it to Google App Engine account. Tools used : JDK 1.6 Eclipse 3.7 + Google Plugin for Eclipse Google App Engine Java SDK 1.6.3.1 Note GAE supports …
In this tutorial, we show you how to create a simple “hello world” Android project in Eclipse IDE + ADT plugin, and run it with Android Virtual Device (AVD). The Eclipse ADT plugin provided easy Android project creation and management, components drag and drop, auto-complete and many useful features to speed up your Android development …
A simple hello world guide to display Google Maps on a web page, via Google Maps Javascript API v3. In this tutorial, we show you how to display a map centered on “Malim Nawar, Malaysia” (my hometown), and use “marker (small icon)” to identify the location on the map. Full example… <html> <head> <title>Google Map …
In this tutorial, we will show you how to integrate Spring Security with a Spring MVC web application to secure a URL access. After implementing Spring Security, to access the content of an “admin” page, users need to key in the correct “username” and “password”. Technologies used : Spring 3.2.8.RELEASE Spring Security 3.2.3.RELEASE Eclipse 4.2 …
Jakarta XML Binding (JAXB; formerly Java Architecture for XML Binding) is an XML binding framework to convert Java objects to and from XML. XML Marshalling – Convert Java objects into XML. XML Unmarshalling – Convert XML back into Java Objects. Note This article will focus on Java 11, JAXB 3 and EclipseLink MOXy JAXB RI. …
In Spring 3, old RequestMapping class is enhanced to support RESTful features, which makes Spring developers easier to develop REST services in Spring MVC. In this tutorial, we show you how to use Spring 3 MVC annotations to develop a RESTful style web application. 1. Project Directory Review the project folder structure. 2. Project Dependency …
This article shows how to start a Grizzly HTTP server to run a JAX-RS or Eclipse Jersey application. Tested with Jersey 3.0.2 Grizzly 3 HTTP server Java 8 Maven JUnit 5 Table of contents 1. Project Directory 2. Jersey dependencies 3. Jersey and HK2 dependency injection 4. Jersey endpoints 5. Start Jersey application 6. Demo …
RESTEasy, JBoss project, implementation of the JAX-RS specification. In this tutorial, we show you how to use RESTEasy framework to create a simple REST style web application. Technologies and Tools used in this article: RESTEasy 2.2.1.GA JDK 1.6 Maven 3.0.3 Eclipse 3.6 What’s REST? Read this, this and this to understand what’s REST. 1. Directory …
The Spring EL is similar with OGNL and JSF EL, and evaluated or executed during the bean creation time. In addition, all Spring expressions are available via XML or annotation. In this tutorial, we show you how to use Spring Expression Language(SpEL), to inject String, integer and bean into property, both in XML and annotation. …
This tutorial shows you how to create a simple hello world example in Spring 3.0. Technologies used in this article : Spring 3.0.5.RELEASE Maven 3.0.3 Eclipse 3.6 JDK 1.6.0.13 P.S Spring 3.0, at least JDK 1.5 is required to work. Spring 3.0 dependencies In Spring 2.5.x, almost the entire Spring modules are grouped into a …
In this tutorial, we show you how to use “SpringData for MongoDB” framework, to perform CRUD operations in MongoDB, via Spring’s annotation and XML schema. Updated on 1/04/2013 Article is updated to use latest SpringData v 1.2.0.RELEASE, it was v1.0.0.M2. Tools and technologies used : Spring Data MongoDB – 1.2.0.RELEASE Spring Core – 3.2.2.RELEASE Java …
List of quick examples to create stored procedures (IN, OUT, IN OUT and Cursor parameter) in Oracle database. PL/SQL code is self-explanatory. 1. Hello World A stored procedure to print out a “Hello World” via DBMS_OUTPUT. CREATE OR REPLACE PROCEDURE procPrintHelloWorld IS BEGIN DBMS_OUTPUT.PUT_LINE(‘Hello World!’); END; / Run it exec procPrintHelloWorld; Output Hello World! 2. …
In this tutorial, we show you how to use JAX-WS to create a SOAP-based web service (document style) endpoint. Compare with RPC style, it need some extra efforts to get it works. Directory structure of this example JAX-WS Web Service End Point Here are the steps to create a document style web service in JAX-WS. …
JAX-WS is bundled with JDK 1.6, which makes Java web service development easier to develop. This tutorial shows you how to do the following tasks: Create a SOAP-based RPC style web service endpoint by using JAX-WS. Create a Java web service client manually. Create a Java web service client via wsimport tool. Create a Ruby …
In JSF 2.0, coding Ajax is just like coding a normal HTML tag, it’s extremely easy. In this tutorial, you will restructure the last JSF 2.0 hello world example, so that, when the button is clicked, it will make an Ajax request instead of submitting the whole form. 1. JSF 2.0 Page A JSF 2.0 …
In this tutorial, we will show you how to develop a JavaServer Faces (JSF) 2.0 hello world example, shows list of JSF 2.0 dependencies, basic annotations and configurations. Project Environment This JSF 2.0 example is built with following tools and technologies JSF 2.1.7 Maven 3 Eclipse 3.6 JDK 1.6 Tomcat 6.0.26 First, review the final …