Home » 2020 » July

Java URLConnection and HttpURLConnection Examples

https://www.codejava.net/java-se/networking/java-urlconnection-and-httpurlconnection-examples In this article, you will learn how to use the URLConnectionand HttpURLConnection classes for developing Java network applications through various examples. For understanding the API for URLConnection and HttpURLConnection, please refer to this tutorial. Here is the list of examples in this article: Download a web page’s HTML source code Check HTTP Response Code...
Continue reading

Linux 환경 변수 설정 및 MariaDB 라이브러리 적용하기

Linux에서 MariaDB Client 라이브러리를 적용하려고 했다. Windows에서는 Eclipse라는 강력한 IDE가 경로만 잡아주면 알아서 라이브러리를 적용해준다. Linux에서도 마찬가지로 경로를 잡아주는 작업이 필요하다. 라이브러리를 적용하려고 하다보니 기본 환경변수 세팅도 같이 하게 되었다. ** 테스트 환경 ** OS        : CentOS 7 JDK       : 1.8 1. 환경 변수 설정하기 # vim...
Continue reading

How To Install Java on CentOS and Fedora

sudo yum install java-1.8.0-openjdk sudo yum install java-1.8.0-openjdk-devel Using Environment Variables Many Java applications use the JAVA_HOME or JRE_HOME environment variables to determine which java executable to use. For example, if you installed Java to /usr/java/jdk1.8.0_161/jre/bin (i.e. java executable is located at /usr/java/jdk1.8.0_161/jre/bin/java), you could set your JAVA_HOME environment variable in a bash shell or script like so: If you want JAVA_HOME to...
Continue reading