如何使用Class-Path加载整个目录:jar清单头?

时间:2014-09-04 12:43:14

标签: java regex jar relative-path manifest.mf

如果在jar文件的清单中需要加载不可执行的jar ,我有Class-Path:规范,然后是一个将jars作为类路径的目录一个jar文件。然后清单会加载整个目录还是只会失败?

更新: 我尝试使用Class-Path: foo/*,但无法加载foo目录。清单类路径是否不支持regex>

1 个答案:

答案 0 :(得分:1)

只要您的 $scope.Save = function (data) { $http.post($rootScope.WebApiURL + '/updatemanifeststatus'); //var promise = $http.get($rootScope.WebApiURL + '/getmanifeststatus'); $scope.manifeststatus = data; console.log("1"); $scope.showstatus = true; console.log("2"); $scope.alert = { type: 'success', msg: 'Published Successfully.' }; console.log("3"); $(".publishStatus").show(); console.log("4"); $timeout($scope.Refresh1(), 2000); console.log("5"); } $scope.Refresh1 = function () { //refresh console.log("6"); $state.go($state.current, {}, { reload: true }); } 目录只包含foo个文件,就可以安全地设置.class标题,如下所示:

Class-Path:

由于其中包含不可执行的jar,因此您应该使用Maven之类的构建工具为您生成Class-Path: foo/ 条目。不可执行的jar将是Maven项目的依赖项。

参考:

  • enter image description here