有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

windows将Java JRE安装为service fabric中的启动任务

我加了jre-8u121-windows-x64.exe并做了一个install.cmd

start /B /WAIT jre-8u121-windows-x64.exe /s SPONSORS=0

在我的/PackageRoot/Code文件夹中

补充说

<SetupEntryPoint>
  <ExeHost>
    <Program>install.cmd</Program>
    <WorkingFolder>CodePackage</WorkingFolder>
    <ConsoleRedirection FileRetentionCount="5" FileMaxSizeInKb="2048"/>
  </ExeHost>
</SetupEntryPoint>

我的服务清单

将主体添加到应用程序清单

<Principals>
<Users>
  <User Name="Admin">
    <MemberOf>
      <SystemGroup Name="Administrators" />
    </MemberOf>
  </User>
</Users>

并运行策略

<Policies>
  <RunAsPolicy CodePackageRef="Code" UserRef="Admin" EntryPointType="All" />
</Policies>

但由于某些原因,没有安装JRE

当使用上面的CMD版本时,它不会失败,我也没有任何日志文件来说明原因

我还直接在程序和服务清单的Arguments元素中尝试了jre-8u121-windows-x64.exe /s,它给出了一个问题,事件日志中的退出代码为1,但也没有关于失败原因的真实信息

SetupEntryPoint:ExeEntryPointDescription { Program = jre-8u121-windows-x64.exe, Arguments = /s /L d:/javainstall.log, WorkingFolder = Work, PeriodicIntervalInSeconds = 0 ConsoleRedirectionEnabled = true ConsoleRedirectionFileRetentionCount = 5 ConsoleRedirectionFileMaxSizeInKb = 2048 } terminated with exitcode 1. CodePackageIdentifier { ServicePackageId = S-Innovations.Elastic.ElasticApplicationType_App31:S-Innovations.Elastic.ElasticServicePkg, CodePackageName = Code }:131369814689037041

共 (1) 个答案