This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <properties> | |
| <project.vcs.branch/> | |
| </properties> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <plugin> | |
| <artifactId>maven-jar-plugin</artifactId> | |
| <version>3.1.0</version> | |
| <executions> | |
| <execution> | |
| <phase>package</phase> | |
| <goals> | |
| <goal>jar</goal> | |
| </goals> | |
| <configuration> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <plugin> | |
| <version>2.8.2</version> | |
| <artifactId>maven-deploy-plugin</artifactId> | |
| <executions> | |
| <execution> | |
| <phase>deploy</phase> | |
| <goals> | |
| <goal>deploy</goal> | |
| </goals> | |
| </execution> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class App { | |
| static { | |
| new Thread(() -> { | |
| Server server = new Server(8080); | |
| ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS); | |
| context.setContextPath("/"); | |
| server.setHandler(context); | |
| try { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <dependencies> | |
| <dependency> | |
| <groupId>org.eclipse.jetty</groupId> | |
| <artifactId>jetty-server</artifactId> | |
| <version>9.4.6.v20170531</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.eclipse.jetty</groupId> | |
| <artifactId>jetty-servlet</artifactId> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.zt; | |
| import java.io.BufferedReader; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.io.InputStreamReader; | |
| import java.net.URL; | |
| import java.net.URLConnection; | |
| import java.util.concurrent.Executors; | |
| import java.util.concurrent.ScheduledExecutorService; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| final FileReader in = new FileReader(new File("lines.txt")); | |
| BufferedReader reader = new BufferedReader(in); | |
| final ArrayList<String> strings = new ArrayList<>(); | |
| String line; | |
| while ((line = reader.readLine()) != null) { | |
| strings.add(line); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for file in `find . -name *.jar`; do jar -ft $file >> ~/out.txt ; done | |
| grep "com/sun/[a-z]" out.txt | awk -F"/" '{print $1"/"$2"/"$3}' | sort -u | |
| com/sun/accessibility | |
| com/sun/activation | |
| com/sun/applet2 | |
| com/sun/awt | |
| com/sun/beans | |
| com/sun/codemodel | |
| com/sun/corba |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from isuper/java-oracle:jdk_8 | |
| ENV JRE_HOME=/usr/lib/jvm/java-8-oracle | |
| run curl -Lks https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-software-7.0.5-jira-7.0.5.tar.gz -o /root/jira.tar.gz | |
| run /usr/sbin/useradd --create-home --home-dir /usr/local/jira --shell /bin/bash jira | |
| run mkdir -p /opt/jira | |
| run tar zxf /root/jira.tar.gz --strip=1 -C /opt/jira | |
| run mkdir -p /opt/jira-home | |
| run echo "jira.home = /opt/jira-home" > /opt/jira/atlassian-jira/WEB-INF/classes/jira-application.properties |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class NullPointerExceptionsPuzzle { | |
| public static void main(String[] args) { | |
| try { | |
| throw new NullPointerException("NullPointerException 1"); | |
| } catch (NullPointerException e) { | |
| throw new NullPointerException("NullPointerException 2"); | |
| } finally { | |
| return; | |
| } | |
| } |