---
title: "简单判断所选目录是否是tomcat目录"
author: "annewman"
date: "2010-06-25T15:51:33Z"
tags: ["Eclipse", "Tomcat"]
categories: ["编程语言"]
slug: "tomcat"
draft: false
lastmod: "2010-06-25T15:54:57Z"
id: 699312
url: "https://annewman.iteye.com/blog/699312"
---

```
public static boolean isValidTomcat(String path) {
  Path installPath = new Path(path);
  String id = "org.eclipse.jst.server.tomcat.60";
  IStatus status = TomcatPlugin.getInstance()
    .verifyInstallPathWithFolderCheck(installPath, id);
  if (status.isOK())
   return true;
  return false;
 }
```