Mac 版本:
project_loc=$1echo "project_loc:"$project_locclass_root_loc="$project_loc"/bin/echo "class_root_loc:"$class_root_locjava_type_name=$2echo "java_type_name:"$java_type_namepackage_loc=${java_type_name//./\/}echo "package_loc:"$package_locclass_loc="$class_root_loc""$package_loc".classecho "class_loc:"$class_locopen -R "$class_loc"
找到工程目录,然后我的class文件都在bin下面,替换包路径的“.”变成“/”,凑成class全路径,使用open命令定位文件。
Eclipse配置
Windows版本:
@echo off set calssdir=%1set package=%2echo %calssdir%\%package%.classset package=%package:.=\%echo %calssdir%\%package%.classstart explorer /select, %calssdir%\%package%.class
Eclipse使用External Tools定位java 源文件目录路径 - stevenlii - 博客园
http://www.cnblogs.com/stevenlii/p/8513611.html