Skip to content

Instantly share code, notes, and snippets.

donchan922 donchan922

Block or report user

Report or block donchan922

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@donchan922
donchan922 / pom.xml
Created Aug 19, 2018
MavenでJDKのバージョンを指定する方法-その2
View pom.xml
<project>
[...]
<build>
[...]
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
View ScannerExample.java
import java.util.Scanner;
public class ScannerExample {
public static void main (String[] args) {
// System.in -> キーボード入力を受け付けるための引数
Scanner scanner = new Scanner(System.in);
System.out.print("名前を入力してください:");
// キーボード入力を受け付ける
String name = scanner.next();
View BufferedReaderExample.java
import java.io.*;
class BufferedReaderExample {
public static void main (String[] args) {
// System.in -> キーボード入力を受け付けるための引数
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
System.out.print("名前を入力してください:");
try {
// キーボード入力を受け付ける
View homebrew-tomcat-1.sh
$ brew search tomcat
==> Formulae
tomcat tomcat-native tomcat@6 tomcat@7 tomcat@8
View homebrew-tomcat-2.sh
$ brew install tomcat
==> Downloading https://www.apache.org/dyn/closer.cgi?path=/tomcat/tomcat-9/v9.0.10/bin/apac
==> Best Mirror http://ftp.kddilabs.jp/infosystems/apache/tomcat/tomcat-9/v9.0.10/bin/apache
######################################################################## 100.0%
==> Caveats
To have launchd start tomcat now and restart at login:
brew services start tomcat
Or, if you don't want/need a background service you can just run:
catalina run
View homebrew-tomcat-3.sh
$ brew services start tomcat
==> Successfully started `tomcat` (label: homebrew.mxcl.tomcat)
View homebrew-tomcat-4.sh
$ brew services stop tomcat
Stopping `tomcat`... (might take a while)
==> Successfully stopped `tomcat` (label: homebrew.mxcl.tomcat)
View pi4j-version-error-1.sh
$ cd /opt/pi4j/examples
$ javac -classpath .:classes:/opt/pi4j/lib/'*' -d . ControlGpioExample.java
$ sudo java -classpath .:classes:/opt/pi4j/lib/'*' ControlGpioExample
<--Pi4J--> GPIO Control Example ... started.
Unable to determine hardware version. I see: Hardware : BCM2835
,
- expecting BCM2708 or BCM2709.
If this is a genuine Raspberry Pi then please report this
to projects@drogon.net. If this is not a Raspberry Pi then you
are on your own as wiringPi is designed to support the
View pi4j-version-error-2.sh
$ sudo apt-cache policy pi4j
pi4j:
インストールされているバージョン: (なし)
候補: 1.1
バージョンテーブル:
1.1 0
500 http://repository.pi4j.com/ wheezy/rpi armhf Packages
100 /var/lib/dpkg/status
You can’t perform that action at this time.