运行velocity的官方例子
2011-05-30 00:36
218 查看
作者:yan
1.到官网下载velocity的包,解压某目录。
2.cmd进入examples/app_example1 下,运行example.bat。
注:
1. 确保JDK环境变量OK
2.example.bat的内容如下:
set VELCP=.
for %%i in (../../bin/*.jar) do call appendVELCP %%i
for %%i in (../../bin/lib/*.jar) do call appendVELCP %%i
echo Using classpath: %VELCP%
java -cp %VELCP% Example example.vm
修改为:
set VELCP=.
for %%i in (../../velocity-1.7.jar) do call appendVELCP %%i
for %%i in (../../lib/*.jar) do call appendVELCP %%i
echo Using classpath: %VELCP%
java -cp %VELCP% Example example.vm
运行!这时可能还报错,原因可能是没有重新编译!
解决方法:将example.bat内容的java运行指令修改为编译指令如下:
rem java -cp %VELCP% Example example.vm
javac -cp %VELCP% Example.java
运行example.bat,编译通过后,再修改回来,再运行,OK!
另:example.bat中调用的appendVELCP批处理脚本为appendVELCP.bat,内容如下:
set VELCP=%VELCP%;%1
1.到官网下载velocity的包,解压某目录。
2.cmd进入examples/app_example1 下,运行example.bat。
注:
1. 确保JDK环境变量OK
2.example.bat的内容如下:
set VELCP=.
for %%i in (../../bin/*.jar) do call appendVELCP %%i
for %%i in (../../bin/lib/*.jar) do call appendVELCP %%i
echo Using classpath: %VELCP%
java -cp %VELCP% Example example.vm
修改为:
set VELCP=.
for %%i in (../../velocity-1.7.jar) do call appendVELCP %%i
for %%i in (../../lib/*.jar) do call appendVELCP %%i
echo Using classpath: %VELCP%
java -cp %VELCP% Example example.vm
运行!这时可能还报错,原因可能是没有重新编译!
解决方法:将example.bat内容的java运行指令修改为编译指令如下:
rem java -cp %VELCP% Example example.vm
javac -cp %VELCP% Example.java
运行example.bat,编译通过后,再修改回来,再运行,OK!
另:example.bat中调用的appendVELCP批处理脚本为appendVELCP.bat,内容如下:
set VELCP=%VELCP%;%1
相关文章推荐
- 运行velocity的官方例子
- TensorFlow 运行官方文档中文版 简单例子出现:IndentationError:unexpected indent
- quick-cocos2d-x运行官方例子
- React Native运行官方例子----组件集合
- react native 学习实践----运行facebook官方提供的例子
- 运行百度地图官方例子出现“程序意外停止”解决
- Android-图像识别项目OpenCV(2):运行官方例子中的脸部识别程序
- rhel7 编写CMakeList.txt编译运行MySQL官方例子代码
- Android-图像识别项目OpenCV(2):运行官方例子中的脸部识别程序
- Velocity 第一个例子. 正常运行.
- VS2013 配置使用微软开源sdk: C++ REST SDK 及运行官方的 JSON例子
- VS2013 配置使用微软开源sdk: C++ REST SDK 及运行官方的 JSON例子
- Python import theano 运行LSTM官方例子
- Android-图像识别项目OpenCV(2):运行官方例子中的脸部识别程序
- Theano中LSTM官方教程例子运行
- 成功运行第一个ServiceMix官方例子 Writing a http upload application
- BDB c++例子,从源码编译到运行
- Rust运行时指南(官方文档翻译)
- 今天和别人讨论发现以前运行estuary例子方法是错误的