admin管理员组文章数量:1794759
如何将Java源代码转换为HTML页面
Java2HTML是将Java源代码转换为彩色和可浏览HTML页面的工具,其步骤非常简单。
转换步骤1)下载Java2HTML – www.java2html/download.html
2)解压缩,例如“ D:\\ Java2HTML”
3)编辑“ j2h.bat”文件并修改CLASSPATH变量。 确保它指向正确的j2h.jar库。
@echo off REM Change this Script, to suit your needs REM The next few line combines the command line args into one set _j2h_parameter= :GetParameter if "%1" == "" goto end set _j2h_parameter=%_j2h_parameter% "%1" shift goto GetParameter :end REM runs Java2HTML set MBACKUP=%CLASSPATH% set CLASSPATH=D:\\Java2HTML\\j2h.jar;%CLASSPATH% java j2h %_j2h_parameter% set CLASSPATH=%MBACKUP%4)将“ j2h”设置为Windows环境变量。 (如果需要全局访问该命令)
5)发出以下命令
C:\\>j2h -js D:\\Java2HTML\\source -d D:\\Java2HTML\\outputD:\\ Java2HTML \\ source是要转换的Java源代码 D:\\ Java2HTML \\ output是生成的HTML输出文件夹
结果–这是将所有TestNG源代码转换为HTML页面的示例。
C:\\>j2h -js D:\\Java2HTML\\source -d D:\\Java2HTML\\output Java2HTML Version 1.5 Copyright (c) 1999-2007, Enterprise Solution Consultants Limited, All Rights Reserved. New Versions available from www.java2html (type j2h with no arguments to get help) Created D:\\Java2HTML\\output\\stylesheet.css Created D:\\Java2HTML\\output\\front.html Created: D:\\Java2HTML\\output\\org\\testng\\internal\\Invoker.java.html Created: D:\\Java2HTML\\output\\org\\testng\\ClassMethodMap.java.html Created: D:\\Java2HTML\\output\\org\\testng\\v6\\TestPlan.java.html Created: D:\\Java2HTML\\output\\org\\testng\\annotations\\Test.java.html Created: D:\\Java2HTML\\output\\org\\testng\\internal\\annotations\\JDK14TagFactory.java.html Created: D:\\Java2HTML\\output\\org\\testng\\annotations\\AfterMethod.java.html Created: D:\\Java2HTML\\output\\org\\testng\\internal\\TestMethodWorker.java.html Created: D:\\Java2HTML\\output\\org\\testng\\JUnitConverter.java.html Created: D:\\Java2HTML\\output\\org\\testng\\internal\\BaseClassFinder.java.html Created: D:\\Java2HTML\\output\\org\\testng\\internal\\AnnotationTestConverter.java.html Created: D:\\Java2HTML\\output\\org\\testng\\junit\\JUnitDirectoryConverter.java.html Created: D:\\Java2HTML\\output\\org\\testng\\JUnitConverterTask.java.html Created: D:\\Java2HTML\\output\\org\\testng\\remote\\strprotocol\\GenericMessage.java.html Created: D:\\Java2HTML\\output\\org\\testng\\xml\\ClassSuite.java.html Created: D:\\Java2HTML\\output\\org\\testng\\internal\\thread\\ThreadTimeoutException.java.html Created: D:\\Java2HTML\\output\\org\\testng\\internal\\BaseTestMethod.java.html Created: D:\\Java2HTML\\output\\org\\testng\\annotations\\TestInstance.java.html 标记: HTML Java 源代码翻译自: mkyong/java/how-to-convert-java-source-code-to-html-page/
版权声明:本文标题:如何将Java源代码转换为HTML页面 内容由林淑君副主任自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.xiehuijuan.com/baike/1686926255a118987.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论