SupportWriter space ↗
A JOURNAL ABOUT TECHNOLOGY

Learn something new.
Write. Share.

A space to connect knowledge, one line of code a day.
Discover tutorials, ideas, and notes from a learning journey.

1967 notes & counting ↙
EDITOR’S PICK ↗
Pentesting

Planning Your First Web Application Pentest: Scope, Safety, and Evidence

Build a focused web pentest plan with clear authorization, realistic objectives, controlled testing, and evidence that developers can use.

D Putu Adi Guna Permana · 3 min read
FOR YOUR CURIOSITY

Latest notes.

CORE API / NOTES</>↗
Core API01 May 2006

How do I split a string?

Prior to Java 1.4 we use java.util.StringTokenizer class to split a tokenized string, for example a comma separated string. Starting from Java 1.4 and later the java.lang.String class introduce a String.split(String regex) method that simplify this process. Below is a code snippet how to do it. package org.kodejava.lang; import java.util.Arrays; public class StringSplit { public […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API30 Apr 2006

How do I execute other applications from Java?

The following program allows you to run / execute other application from Java using the Runtime.exec() method. package org.kodejava.lang; import java.io.IOException; public class RuntimeExec { public static void main(String[] args) { //String command = "/Applications/Safari.app/Contents/MacOS/Safari"; String command = "explorer.exe"; try { Process process = Runtime.getRuntime().exec(new String[]{command}); } catch (IOException e) { e.printStackTrace(); } } }

Wayan · 1 min read
CORE API / NOTES</>↗
Core API29 Apr 2006

How do I get path / classpath separator?

OS platform has a different symbol used for path separator. Path separator is a symbol that separate one path element from the other. In Windows the path separator is a semicolon symbol (;), you have something like: .;something.jar;D:/libs/commons.jar While in Linux based operating systems the path separator is a colon symbol (:), it looks like: […]

Wayan · 1 min read
SWING / NOTES</>↗
Swing27 Apr 2006

How do I make a centered JFrame?

If you have a JFrame in your Java Swing application and want to center its position on the screen you can use the following code snippets. The first way is to utilize java.awt.Toolkit class to get the screen size. The getScreenSize() method return a java.awt.Dimension from where we can get the width and height of […]

Wayan · 2 min read
CORE API / NOTES</>↗
Core API23 Apr 2006

How do I get environment variables?

Environment variables are a set of dynamic values that can affect a running process, such as our Java program. Each process usually have their own copy of these variables. Now we would like to obtain the available variables in our environment or operating system, how do I do this in Java? Here is a code […]

Wayan · 2 min read
JDBC / NOTES</>↗
JDBC20 Apr 2006

How do I insert a record into database table?

In this example you’ll learn how to create a program to insert data into a database table. To insert a data we need to get connected to a database. After a connection is obtained you can create a java.sql.Statement object from it, and using this object we can execute some query strings. package org.kodejava.jdbc; import […]

Wayan · 2 min read
✳

Knowledge grows when shared.

Stay curious. There is always something new to learn.

Explore notes ↗
Putu Adi Guna Permana
ABOUT THE AUTHOR

Dr (C). Ir. Putu Adi Guna Permana, S.Kom., M.Kom., IPM., ASEAN Eng.

Writer and founder of Diary Coding — sharing notes, tutorials, and experiences about programming for anyone who wants to keep learning.