---
title: "5.17"
author: "cnyangqi"
date: "2011-05-17T12:09:41Z"
tags: []
categories: ["编程语言"]
slug: "5-17"
draft: false
lastmod: "2011-05-17T12:09:41Z"
id: 1046862
url: "https://yangq.iteye.com/blog/1046862"
---

1,获取log4j配置文件路径

```java

public class Test {
	public void t() {
		System.out.println(getClass().getResource("/log4j.properties"));
	}

	public static void main(String[] args) {
		new Test().t();
	}
}

```