0

我在运行 ant 以在 Ubuntu 上构建 java 代码时遇到此错误。该应用程序必须部署在 Tomcat web-app 目录中。当我在源目录中运行 ant 时,它会构建所有文件并将应用程序部署在 web-app 目录中。但是,在完成之前,它会因错误而终止。下面列出了我得到的错误。

java.net.MalformedURLException: no protocol: /usr/share/tomcat7/webapps/manager/reload?path=http%3A%2F%2Flocalhost%3A8080%2Fokm%2Findex.jsp
    at java.net.URL.<init>(URL.java:585)    
    at java.net.URL.<init>(URL.java:482)
    at java.net.URL.<init>(URL.java:431)
    at org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.java:176)
    at org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.java:150)
    at org.apache.catalina.ant.ReloadTask.execute(ReloadTask.java:45)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
    at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:390)
    at org.apache.tools.ant.Target.performTasks(Target.java:411)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
    at org.apache.tools.ant.Main.runBuild(Main.java:809)
    at org.apache.tools.ant.Main.startAnt(Main.java:217)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

请告诉我我做错了什么?

4

1 回答 1

0

使用file:///(the file). 系统在这里想要的“协议”是file:/

于 2013-06-21T17:33:26.823 回答