在Windows上从命令行下载最新的Java SE Runtime Environment 8 [英] From command line download latest Java SE Runtime Environment 8 on Windows

查看:51
本文介绍了在Windows上从命令行下载最新的Java SE Runtime Environment 8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows服务器上,我正在寻找一种从命令行下载最新Java SE Runtime的可靠方法.

On a Windows server, I am looking for a robust way to download latest Java SE Runtimes from command-line .

我的要求是检查系统上是否安装了Java.如果找不到java,则我们的MSI安装程序(使用WIX创建)需要连接oracle java下载页面,并在后台静默下载java安装程序,然后静默调用安装程序.下载选项可以在VB脚本/PowerShell/批处理/Java中

My requirement is to check if java is installed on the system. If java is not found, our MSI installer (created with WIX) need to connect oracle java download page and silently download java installer in the background and invoke the installer silently. Download option can be in VB script/PowerShell/batch/Java

使用 jre-8u121-windows-x64.exe/s 选项可以轻松地静默安装Java.

Installing java silently is easy with jre-8u121-windows-x64.exe /soption.

我可以找到几个解决方案,以使用curl/wget在* nix上下载jre来自这篇文章

I could find couple of solutions to download jre on *nix with curl/wget from this post

但是,在Windows上找不到任何可靠的解决方案.

However, couldn't find any robust solution on Windows.

请告知我,从Windows命令行下载JRE安装程序有一种可靠的方法.

Please let me know is there a fool proof way to download JRE installer on Windows from command line.

推荐答案

我会选择巧克力,它很简单,轻松并为您处理所有痛苦(例如紧跟新版本或链接更改时的情况,等等)

I'd go with chocolatey, its simple, easy and handles all the pain for you (like keeping up with the new versions or when the link changes, etc)

这篇关于在Windows上从命令行下载最新的Java SE Runtime Environment 8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆