JAVA-1749 Move modules language interop and console
This commit is contained in:
parent
0909133437
commit
46ebcba3a0
|
@ -0,0 +1,5 @@
|
||||||
|
#Core Java Console
|
||||||
|
|
||||||
|
[Read and Write User Input in Java](http://www.baeldung.com/java-console-input-output)
|
||||||
|
[Formatting with printf() in Java](https://www.baeldung.com/java-printstream-printf)
|
||||||
|
[ASCII Art in Java](http://www.baeldung.com/ascii-art-in-java)
|
|
@ -0,0 +1,142 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project
|
||||||
|
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<artifactId>core-java-console</artifactId>
|
||||||
|
<version>0.1.0-SNAPSHOT</version>
|
||||||
|
<name>core-java-console</name>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.baeldung.core-java-modules</groupId>
|
||||||
|
<artifactId>core-java-modules</artifactId>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
<relativePath>../</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>core-java-console</finalName>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>copy-dependencies</id>
|
||||||
|
<phase>prepare-package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-dependencies</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>${project.build.directory}/libs</outputDirectory>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
|
<version>${exec-maven-plugin.version}</version>
|
||||||
|
<configuration>
|
||||||
|
<executable>java</executable>
|
||||||
|
<mainClass>com.baeldung.outofmemoryerror.OutOfMemoryGCLimitExceed</mainClass>
|
||||||
|
<arguments>
|
||||||
|
<argument>-Xmx300m</argument>
|
||||||
|
<argument>-XX:+UseParallelGC</argument>
|
||||||
|
<argument>-classpath</argument>
|
||||||
|
<classpath />
|
||||||
|
<argument>com.baeldung.outofmemoryerror.OutOfMemoryGCLimitExceed</argument>
|
||||||
|
</arguments>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<version>${maven-javadoc-plugin.version}</version>
|
||||||
|
<configuration>
|
||||||
|
<source>${source.version}</source>
|
||||||
|
<target>${target.version}</target>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>integration</id>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>test</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<excludes>
|
||||||
|
<exclude>**/*ManualTest.java</exclude>
|
||||||
|
</excludes>
|
||||||
|
<includes>
|
||||||
|
<include>**/*IntegrationTest.java</include>
|
||||||
|
<include>**/*IntTest.java</include>
|
||||||
|
</includes>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<configuration>
|
||||||
|
<systemPropertyVariables>
|
||||||
|
<test.mime>json</test.mime>
|
||||||
|
</systemPropertyVariables>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
|
<version>${exec-maven-plugin.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>run-benchmarks</id>
|
||||||
|
<!-- <phase>integration-test</phase> -->
|
||||||
|
<phase>none</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>exec</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<classpathScope>test</classpathScope>
|
||||||
|
<executable>java</executable>
|
||||||
|
<arguments>
|
||||||
|
<argument>-classpath</argument>
|
||||||
|
<classpath />
|
||||||
|
<argument>org.openjdk.jmh.Main</argument>
|
||||||
|
<argument>.*</argument>
|
||||||
|
</arguments>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven-javadoc-plugin.version>3.0.0-M1</maven-javadoc-plugin.version>
|
||||||
|
<exec-maven-plugin.version>1.6.0</exec-maven-plugin.version>
|
||||||
|
<source.version>1.8</source.version>
|
||||||
|
<target.version>1.8</target.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
</project>
|
|
@ -1,10 +1,9 @@
|
||||||
package com.baeldung.asciiart;
|
package com.baeldung.asciiart;
|
||||||
|
|
||||||
import java.awt.Font;
|
import com.baeldung.asciiart.AsciiArt.Settings;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import com.baeldung.asciiart.AsciiArt.Settings;
|
import java.awt.*;
|
||||||
|
|
||||||
public class AsciiArtIntegrationTest {
|
public class AsciiArtIntegrationTest {
|
||||||
|
|
||||||
|
@ -15,6 +14,8 @@ public class AsciiArtIntegrationTest {
|
||||||
Settings settings = asciiArt.new Settings(new Font("SansSerif", Font.BOLD, 24), text.length() * 30, 30); // 30 pixel width per character
|
Settings settings = asciiArt.new Settings(new Font("SansSerif", Font.BOLD, 24), text.length() * 30, 30); // 30 pixel width per character
|
||||||
|
|
||||||
asciiArt.drawString(text, "*", settings);
|
asciiArt.drawString(text, "*", settings);
|
||||||
|
|
||||||
|
throw new NullPointerException();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -33,3 +33,63 @@
|
||||||
- [Making a JSON POST Request With HttpURLConnection](https://www.baeldung.com/httpurlconnection-post)
|
- [Making a JSON POST Request With HttpURLConnection](https://www.baeldung.com/httpurlconnection-post)
|
||||||
- [How to Find an Exception’s Root Cause in Java](https://www.baeldung.com/java-exception-root-cause)
|
- [How to Find an Exception’s Root Cause in Java](https://www.baeldung.com/java-exception-root-cause)
|
||||||
- [Convert Hex to ASCII in Java](https://www.baeldung.com/java-convert-hex-to-ascii)
|
- [Convert Hex to ASCII in Java](https://www.baeldung.com/java-convert-hex-to-ascii)
|
||||||
|
|
||||||
|
|
||||||
|
#New module structure
|
||||||
|
###########################
|
||||||
|
|
||||||
|
#Leave in core-java:
|
||||||
|
[Getting Started with Java Properties](http://www.baeldung.com/java-properties)
|
||||||
|
[Java Money and the Currency API](http://www.baeldung.com/java-money-and-currency)
|
||||||
|
[Introduction to Java Serialization](http://www.baeldung.com/java-serialization)
|
||||||
|
[Guide to UUID in Java](http://www.baeldung.com/java-uuid)
|
||||||
|
[Compiling Java *.class Files with javac](http://www.baeldung.com/javac)
|
||||||
|
[Introduction to Javadoc](http://www.baeldung.com/javadoc)
|
||||||
|
[Guide to the Externalizable Interface in Java](http://www.baeldung.com/java-externalizable)
|
||||||
|
[What is the serialVersionUID?](http://www.baeldung.com/java-serial-version-uid)
|
||||||
|
[A Guide to the ResourceBundle](http://www.baeldung.com/java-resourcebundle)
|
||||||
|
[Merging java.util.Properties Objects](https://www.baeldung.com/java-merging-properties)
|
||||||
|
|
||||||
|
#Move to language interop (Done)
|
||||||
|
[Introduction to Nashorn](http://www.baeldung.com/java-nashorn)
|
||||||
|
|
||||||
|
#Move to new new package: core-java-console (Done)
|
||||||
|
[Read and Write User Input in Java](http://www.baeldung.com/java-console-input-output)
|
||||||
|
[Formatting with printf() in Java](https://www.baeldung.com/java-printstream-printf)
|
||||||
|
[ASCII Art in Java](http://www.baeldung.com/ascii-art-in-java)
|
||||||
|
|
||||||
|
#Move to core-java-string-operations-2
|
||||||
|
[Guide to Character Encoding](https://www.baeldung.com/java-char-encoding)
|
||||||
|
[Convert Hex to ASCII in Java](https://www.baeldung.com/java-convert-hex-to-ascii) #remove additional readme file
|
||||||
|
|
||||||
|
#Move to core-javadatetime-operations-2
|
||||||
|
[Finding Leap Years in Java](https://www.baeldung.com/java-leap-year)
|
||||||
|
|
||||||
|
#Move to core-java-time-measurements
|
||||||
|
[Java Timer](http://www.baeldung.com/java-timer-and-timertask)
|
||||||
|
|
||||||
|
#Move to core-java-reflection
|
||||||
|
[How to Get a Name of a Method Being Executed?](http://www.baeldung.com/java-name-of-executing-method)
|
||||||
|
|
||||||
|
#Move to core-java-streams
|
||||||
|
[How to Find all Getters Returning Null](http://www.baeldung.com/java-getters-returning-null)
|
||||||
|
|
||||||
|
#Move to core-java-jvm
|
||||||
|
[How to Get the Size of an Object in Java](http://www.baeldung.com/java-size-of-object)
|
||||||
|
|
||||||
|
#Move to data-structures module
|
||||||
|
[Graphs in Java](https://www.baeldung.com/java-graphs)
|
||||||
|
|
||||||
|
#Move to core-java-collections-3
|
||||||
|
[Quick Guide to the Java Stack](https://www.baeldung.com/java-stack)
|
||||||
|
|
||||||
|
#These are already in another module
|
||||||
|
[Using Curl in Java](https://www.baeldung.com/java-curl) #Core Java Networking (Part 2)
|
||||||
|
[Creating a Java Compiler Plugin](http://www.baeldung.com/java-build-compiler-plugin) # Core Java Sun
|
||||||
|
[Java Global Exception Handler](http://www.baeldung.com/java-global-exception-handler) #Core Java Exceptions
|
||||||
|
[Java – Try with Resources](https://www.baeldung.com/java-try-with-resources) #Core Java Exceptions
|
||||||
|
[How to Find an Exception’s Root Cause in Java](https://www.baeldung.com/java-exception-root-cause) #Core Java Exceptions
|
||||||
|
[JVM Log Forging](http://www.baeldung.com/jvm-log-forging) #Core Java JVM
|
||||||
|
[Making a JSON POST Request With HttpURLConnection](https://www.baeldung.com/httpurlconnection-post) #Core Java Networking (Part 2)
|
||||||
|
[Common Java Exceptions](http://www.baeldung.com/java-common-exceptions) #Core Java Exceptions
|
||||||
|
[Retrieve Fields from a Java Class Using Reflection](https://www.baeldung.com/java-reflection-class-fields) #Core Java Reflection
|
|
@ -5,3 +5,4 @@ This module contains articles about Java interop with other language integration
|
||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
|
|
||||||
- [How to Call Python From Java](https://www.baeldung.com/java-working-with-python)
|
- [How to Call Python From Java](https://www.baeldung.com/java-working-with-python)
|
||||||
|
- [Introduction to Nashorn](http://www.baeldung.com/java-nashorn)
|
||||||
|
|
|
@ -1,14 +1,10 @@
|
||||||
package com.baeldung.scripting;
|
package com.baeldung.language.interop.javascript;
|
||||||
|
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import javax.script.Bindings;
|
import javax.script.*;
|
||||||
import javax.script.Invocable;
|
|
||||||
import javax.script.ScriptEngine;
|
|
||||||
import javax.script.ScriptEngineManager;
|
|
||||||
import javax.script.ScriptException;
|
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
Loading…
Reference in New Issue