---
title: "Java shut down hook"
author: "jusi"
date: "2014-12-15T11:02:47Z"
tags: []
categories: ["编程语言"]
slug: "java-shut-down-hook"
draft: false
lastmod: "2014-12-15T11:02:47Z"
id: 2166310
url: "https://jusi.iteye.com/blog/2166310"
---

```
Runtime.getRuntime().addShutdownHook(Thread);
```

Before JVM shut down, it will call each hook you added.