malformmedurlexception:没有协议错误



我在Ubuntu上运行ant构建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)

请告诉我我做错了什么?

使用file:///(the file)。这里系统需要的"协议"是file:/

相关内容

  • 没有找到相关文章

最新更新