我想在microsoft azure上部署我的jar,但它向我显示内部服务器错误。 jar在我的电脑上工作正常,我将以下web.config文件添加到我的wwwroot:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" />
</handlers>
<httpPlatform processPath="%JAVA_HOME%\bin\java.exe"
arguments="-Djava.net.preferIPv4Stack=true -Dserver.port=%HTTP_PLATFORM_PORT% -jar ";%HOME%\site\wwwroot\myjar.jar";">
</httpPlatform>
</system.webServer>
</configuration>
不幸的是它不起作用......我想将它部署在天蓝色的webApp上
答案 0 :(得分:0)
这是一个非格式化的xml文件......现在它可以工作:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" />
</handlers>
<httpPlatform processPath="%JAVA_HOME%\bin\java.exe"
arguments="-Djava.net.preferIPv4Stack=true -Dserver.port=%HTTP_PLATFORM_PORT% -jar %HOME%\site\wwwroot\myjar.jar" >
</httpPlatform>
</system.webServer>
</configuration>