1. 用命令行创建新的project
#>: play new test
输入 test(会有What is the application name?提示)
注:一定要输入test 否则在导入到eclipse中就要手动改配置文件
2. 导入eclipse
>play eclipsify test
打开eclipse 在import 就ok了.
如果在创建project时候未输入test。
就要手动修改test.launch文件,也就是查找<listEntry value="/E:"project"eclipse"play1"/>,得出 E:"project"eclipse"play1 ,然后把文件中所有的E:"project"eclipse"play1替换为test
修改前:
<?xml version="1.0" encoding="UTF-8"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/E:\project\eclipse\play1\test"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
<listEntry value="<?xml version="1.0" encoding="UTF-8"?>
<runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER" javaProject="E:\project\eclipse\play1" path="1" type="4"/>
"/>
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<runtimeClasspathEntry externalArchive="D:\Program Files\play-1.1/modules/test-runner/lib/play-test-runner.jar" path="3" type="2"/>
"/>
<listEntry value="<?xml version="1.0" encoding="UTF-8"?>
<runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath">
<memento exportedEntriesOnly="false" project="E:\project\eclipse\play1"/>
</runtimeClasspathEntry>
"/>
<listEntry value="<?xml version="1.0" encoding="UTF-8"?>
<runtimeClasspathEntry internalArchive="/E:\project\eclipse\play1/conf" path="3" type="2"/>
"/>
</listAttribute>
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="play.server.Server"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="E:\project\eclipse\play1"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n -Dplay.debug=yes -Dplay.id=test -Dapplication.path="${project_loc:E:\project\eclipse\play1}" -Djava.endorsed.dirs="D:\Program Files\play-1.1/framework/endorsed" -javaagent:"D:\Program Files\play-1.1/framework/play.jar""/>
</launchConfiguration>
修改后:
<?xml version="1.0" encoding="UTF-8"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/test"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
<listEntry value="<?xml version="1.0" encoding="UTF-8"?>
<runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER" javaProject="test" path="1" type="4"/>
"/>
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<runtimeClasspathEntry externalArchive="D:\Program Files\play-1.1/modules/test-runner/lib/play-test-runner.jar" path="3" type="2"/>
"/>
<listEntry value="<?xml version="1.0" encoding="UTF-8"?>
<runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath">
<memento exportedEntriesOnly="false" project="test"/>
</runtimeClasspathEntry>
"/>
<listEntry value="<?xml version="1.0" encoding="UTF-8"?>
<runtimeClasspathEntry internalArchive="/test/conf" path="3" type="2"/>
"/>
</listAttribute>
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="play.server.Server"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="test"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n -Dplay.debug=yes -Dplay.id=test -Dapplication.path="${project_loc:test}" -Djava.endorsed.dirs="D:\Program Files\play-1.1/framework/endorsed" -javaagent:"D:\Program Files\play-1.1/framework/play.jar""/>
</launchConfiguration>
posted on 2010-02-01 13:38
冰是没有未来的,因为它的永恒 阅读(1702)
评论(0) 编辑 收藏 所属分类:
playframework