You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
689 B
19 lines
689 B
# -*- coding: utf-8 -*-
|
|
"""票 04:定位 IDEA 捆绑 maven + JDK。"""
|
|
import os, sys, io, glob
|
|
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
|
|
|
|
# IDEA 常见安装位置
|
|
idea_pats = [r'D:\Program Files\JetBrains\*', r'C:\Program Files\JetBrains\*',
|
|
r'D:\JetBrains\*', r'D:\*idea*', r'D:\*\IntelliJ*']
|
|
for p in idea_pats:
|
|
for g in glob.glob(p):
|
|
if os.path.isdir(g):
|
|
print('IDEA dir:', g)
|
|
mvn = glob.glob(os.path.join(g, 'plugins', 'maven', 'lib', 'maven3', 'bin', 'mvn.cmd'))
|
|
for m in mvn:
|
|
print(' MVN:', m)
|
|
|
|
# JDK
|
|
for g in glob.glob(os.path.expanduser(r'~\.jdks\*')):
|
|
print('JDK:', g)
|
|
|