我必须打印java项目的整个源代码.最终版本应如下所示:Eclipse:File - > Print.但使用此功能,您只能一次打印一个文件.
有没有办法用一个命令打印(或创建一个pdf/rtf)整个项目(所有*.java,*.xml,...文件)?
我在windows xp sp3上使用eclipse galileo
编辑:对于每个类/文件页面应该(或多或少)看起来像这样:
1 package utils.libraries;
2
3 import java.io.File;
9
10 /**
11 * @
12 * @
13 * @
14 */
15 public class LibraryExtractor {
16
17 /**
18 *
19 *
20 *
21 *
22 *
23 *
24 *
25 */
26 public static void extranctLibrary(String library, File targetFile) throws
IOException, URISyntaxException {
27 targetFile.getParentFile().mkdirs();
28 if (!targetFile.exists())
29 targetFile.createNewFile();
30 …Run Code Online (Sandbox Code Playgroud) 我们在Windows 7 Enterprise,SP1,64bit上运行.我们刚刚在所有机器上安装了Java 7,这会导致以下问题:
当我的程序尝试从Quality Center与OpenTestArchitecture-API进行通信时,无法创建ActiveX-Component.我使用JACOB作为我的Java-COM库.升级到最新版本的JACOB并没有改变任何东西.
以下测试适用于jdk1.6.0_24(32位)但使用jdk1.7.0_04(32位)失败:
import java.io.File;
import com.jacob.activeX.ActiveXComponent;
import com.jacob.com.ComThread;
import com.jacob.com.Dispatch;
import com.jacob.com.LibraryLoader;
public class JacobTest {
static {
File lib = new File("lib/" + LibraryLoader.getPreferredDLLName() + ".dll");
System.setProperty(LibraryLoader.JACOB_DLL_PATH, lib.getAbsolutePath());
System.out.println("JACOB_DLL_PATH = " + lib.getAbsolutePath());
LibraryLoader.loadJacobLibrary();
}
public static void main(String[] args) {
try {
// Excel: Works with jdk1.6.0_24 AND jdk1.7.0_04
System.out.println("new ActiveXComponent(\"Excel.Application\");");
new ActiveXComponent("Excel.Application");
// Quality Center OTAClient: Only works with jdk1.6.0_24
System.out.println("ActiveXComponent component = new ActiveXComponent(\"TDApiOle80.TDConnection\");");
ActiveXComponent component = new ActiveXComponent("TDApiOle80.TDConnection"); …Run Code Online (Sandbox Code Playgroud) 我正在尝试在我的java应用程序中生成一些sql文件.应用程序不会执行任何sql语句,只需生成带有sql语句的文件并保存即可.
我想使用它java.sql.PreparedStatement来创建我的语句,这样我就不必用自己的方法验证每个字符串等.
有没有办法使用PreparedStatement没有调用java.sql.Connection.prepareStatement(String)功能,因为我没有java.sql.Connection?