通用FASTREPORT打印模块及接口方法
untFastReport.dfm文件:
object frmFastReport: TfrmFastReport
OldCreateOrder = False
Height = 405
Width = 550
object report: TfrxReport
Version = '4.15.10'
DotMatrixReport = False
IniFile = '\Software\Fast Reports'
PreviewOptions.Buttons = [pbPrint, pbLoad, pbSave, pbExport, pbZoom, pbFind, pbOutline, pbPageSetup, pbTools, pbEdit, pbNavigator, pbExportQuick]
PreviewOptions.Zoom = 1.000000000000000000
PrintOptions.Printer = #39044#35774
PrintOptions.PrintOnSheet = 0
ReportOptions.CreateDate = 41954.598210555600000000
ReportOptions.LastChange = 41954.640443842600000000
ScriptLanguage = 'PascalScript'
ScriptText.Strings = (
''
'begin'
''
'end.')
Left = 16
Top = 16
Datasets = <
item
DataSet = DB
DataSetName = 'db'
end
item
DataSet = DB2
DataSetName = 'db2'
end>
Variables = <>
Style = <>
object Data: TfrxDataPage
Height = 1000.000000000000000000
Width = 1000.000000000000000000
end
object Page1: TfrxReportPage
PaperWidth = 210.000000000000000000
PaperHeight = 297.000000000000000000
PaperSize = 9
LeftMargin = 10.000000000000000000
RightMargin = 10.000000000000000000
TopMargin = 10.000000000000000000
BottomMargin = 10.000000000000000000
object ReportTitle1: TfrxReportTitle
Height = 132.283550000000000000
Top = 18.897650000000000000
Width = 718.110700000000000000
object Memo2: TfrxMemoView
Left = 306.141930000000000000
Top = 3.779530000000000000
Width = 94.488250000000000000
Height = 18.897650000000000000
ShowHint = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Arial'
Font.Style = [fsBold]
HAlign = haCenter
Memo.UTF8W = (
#37319#36141#30003#35831#21333)
ParentFont = False
end
object Memo3: TfrxMemoView
Left = 3.779530000000000000
Top = 26.456710000000000000
Width = 71.811070000000000000
Height = 18.897650000000000000
ShowHint = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Arial'
Font.Style = []
Memo.UTF8W = (
#30003#35831#37096#38376#65306)
ParentFont = False
end
object Memo4: TfrxMemoView
Left = 79.370130000000000000
Top = 26.456710000000000000
Width = 219.212740000000000000
Height = 18.897650000000000000
ShowHint = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Arial'
Font.Style = []
ParentFont = False
end
object Memo5: TfrxMemoView
Left = 321.260050000000000000
Top = 26.456710000000000000
Width = 75.590600000000000000
Height = 18.897650000000000000
ShowHint = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Arial'
Font.Style = []
Memo.UTF8W = (
#21040#36135#26085#26399#65306)
ParentFont = False
end
object Memo6: TfrxMemoView
Left = 404.409710000000000000
Top = 26.456710000000000000
Width = 294.803340000000000000
Height = 18.897650000000000000
ShowHint = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Arial'
Font.Style = []
ParentFont = False
end
object Memo7: TfrxMemoView
Left = 3.779530000000000000
Top = 49.133890000000000000
Width = 71.811070000000000000
Height = 18.897650000000000000
ShowHint = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Arial'
Font.Style = []
Memo.UTF8W = (
#30003#35831#20154#65306)
ParentFont = False
end
object Memo8: TfrxMemoView
Left = 79.370130000000000000
Top = 49.133890000000000000
Width = 219.212740000000000000
Height = 18.897650000000000000
ShowHint = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Arial'
Font.Style = []
ParentFont = False
end
object Memo9: TfrxMemoView
Left = 321.260050000000000000
Top = 49.133890000000000000
Width = 75.590600000000000000
Height = 18.897650000000000000
ShowHint = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Arial'
Font.Style = []
Memo.UTF8W = (
#30003#35831#26085#26399#65306)
ParentFont = False
end
object Memo10: TfrxMemoView
Left = 404.409710000000000000
Top = 49.133890000000000000
Width = 294.803340000000000000
Height = 18.897650000000000000
ShowHint = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Arial'
Font.Style = []
ParentFont = False
end
object Memo11: TfrxMemoView
Top = 71.811070000000000000
Width = 75.590600000000000000
Height = 18.897650000000000000
ShowHint = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Arial'
Font.Style = []
Memo.UTF8W = (
#22791#27880#65306)
ParentFont = False
end
object Memo12: TfrxMemoView
Left = 79.370130000000000000
Top = 71.811070000000000000
Width = 619.842920000000000000
Height = 18.897650000000000000
ShowHint = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Arial'
Font.Style = []
ParentFont = False
end
object Memo13: TfrxMemoView
Left = 3.779530000000000000
Top = 113.385900000000000000
Width = 34.015770000000000000
Height = 18.897650000000000000
ShowHint = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Arial'
Font.Style = []
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
#24207#21495)
ParentFont = False
end
object Memo14: TfrxMemoView
Left = 37.795300000000000000
Top = 113.385900000000000000
Width = 60.472480000000000000
Height = 18.897650000000000000
ShowHint = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Arial'
Font.Style = []
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
#29289#26009#32534#21495)
ParentFont = False
end
object Memo15: TfrxMemoView
Left = 98.267780000000000000
Top = 113.385900000000000000
Width = 173.858380000000000000
Height = 18.897650000000000000
ShowHint = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Arial'
Font.Style = []
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
#29289#26009#21517#31216)
ParentFont = False
end
object Memo16: TfrxMemoView
Left = 271.551330000000000000
Top = 113.385900000000000000
Width = 60.472480000000000000
Height = 18.897650000000000000
ShowHint = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Arial'
Font.Style = []
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
#35745#37327#21333#20301)
ParentFont = False
end
object Memo17: TfrxMemoView
Left = 331.582870000000000000
Top = 113.385900000000000000
Width = 94.488250000000000000
Height = 18.897650000000000000
ShowHint = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Arial'
Font.Style = []
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
#35268#27169#22411#21495)
ParentFont = False
end
object Memo18: TfrxMemoView
Left = 426.071120000000000000
Top = 113.385900000000000000
Width = 64.252010000000000000
Height = 18.897650000000000000
ShowHint = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Arial'
Font.Style = []
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
#30003#35831#25968#37327)
ParentFont = False
end
object Memo19: TfrxMemoView
Left = 489.882190000000000000
Top = 113.385900000000000000
Width = 188.976500000000000000
Height = 18.897650000000000000
ShowHint = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Arial'
Font.Style = []
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
#22791#27880)
ParentFont = False
end
end
object MasterData1: TfrxMasterData
Height = 18.897637800000000000
Top = 211.653680000000000000
Width = 718.110700000000000000
DataSet = DB2
DataSetName = 'db2'
RowCount = 0
object Memo20: TfrxMemoView
Left = 3.779530000000000000
Width = 34.015770000000000000
Height = 18.897650000000000000
ShowHint = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Arial'
Font.Style = [fsBold]
HAlign = haCenter
Memo.UTF8W = (
'[db2."SeqNo"]')
ParentFont = False
end
object Memo21: TfrxMemoView
Left = 37.795300000000000000
Top = 0.779530000000000000
Width = 60.472480000000000000
Height = 18.897650000000000000
ShowHint = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Arial'
Font.Style = [fsBold]
HAlign = haCenter
ParentFont = False
end
object Memo22: TfrxMemoView
Left = 98.267780000000000000
Width = 173.858380000000000000
Height = 18.897650000000000000
ShowHint = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Arial'
Font.Style = [fsBold]
HAlign = haCenter
ParentFont = False
end
object Memo23: TfrxMemoView
Left = 272.126160000000000000
Width = 60.472480000000000000
Height = 18.897650000000000000
ShowHint = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Arial'
Font.Style = [fsBold]
HAlign = haCenter
ParentFont = False
end
object Memo24: TfrxMemoView
Left = 333.378170000000000000
Width = 94.488188980000000000
Height = 18.897650000000000000
ShowHint = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Arial'
Font.Style = [fsBold]
HAlign = haCenter
ParentFont = False
end
object Memo25: TfrxMemoView
Left = 428.086890000000000000
Width = 64.251968500000000000
Height = 18.897650000000000000
ShowHint = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Arial'
Font.Style = [fsBold]
HAlign = haCenter
ParentFont = False
end
object Memo26: TfrxMemoView
Left = 491.338900000000000000
Width = 188.976500000000000000
Height = 18.897650000000000000
ShowHint = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Arial'
Font.Style = [fsBold]
HAlign = haCenter
ParentFont = False
end
end
object PageFooter1: TfrxPageFooter
Height = 22.677180000000000000
Top = 291.023810000000000000
Width = 718.110700000000000000
object Memo1: TfrxMemoView
Left = 642.520100000000000000
Width = 75.590600000000000000
Height = 18.897650000000000000
ShowHint = False
HAlign = haRight
Memo.UTF8W = (
'[Page#]')
end
end
end
end
object DB: TfrxDBDataset
UserName = 'db'
CloseDataSource = False
DataSet = cds
BCDToCurrency = False
Left = 64
Top = 8
end
object ExpHtml: TfrxHTMLExport
ShowDialog = False
UseFileCache = True
ShowProgress = False
OverwritePrompt = False
DataOnly = False
FixedWidth = True
Background = False
Centered = False
EmptyLines = True
Print = False
PictureType = gpPNG
Left = 224
Top = 224
end
object cds: TClientDataSet
Aggregates = <>
Params = <>
Left = 112
Top = 8
end
object DB2: TfrxDBDataset
UserName = 'db2'
CloseDataSource = False
DataSet = cds2
BCDToCurrency = False
Left = 168
Top = 8
end
object cds2: TClientDataSet
Aggregates = <>
Params = <>
Left = 216
Top = 16
end
object frxXLSExport1: TfrxXLSExport
UseFileCache = True
ShowProgress = True
OverwritePrompt = False
DataOnly = False
ExportEMF = True
AsText = False
Background = True
FastExport = True
PageBreaks = True
EmptyLines = True
SuppressPageHeadersFooters = False
Left = 152
Top = 224
end
object frxXMLExport1: TfrxXMLExport
UseFileCache = True
ShowProgress = True
OverwritePrompt = False
DataOnly = False
Background = True
Creator = 'FastReport'
EmptyLines = True
SuppressPageHeadersFooters = False
RowsCount = 0
Split = ssNotSplit
Left = 296
Top = 224
end
object frxMailExport1: TfrxMailExport
UseFileCache = True
ShowProgress = True
OverwritePrompt = False
DataOnly = False
ShowExportDialog = True
SmtpPort = 25
UseIniFile = True
TimeOut = 60
ConfurmReading = False
UseMAPI = False
Left = 400
Top = 280
end
object frxPDFExport1: TfrxPDFExport
UseFileCache = True
ShowProgress = True
OverwritePrompt = False
DataOnly = False
PrintOptimized = False
Outline = False
Background = False
HTMLTags = True
Quality = 95
Author = 'FastReport'
Subject = 'FastReport PDF export'
ProtectionFlags = [ePrint, eModify, eCopy, eAnnot]
HideToolbar = False
HideMenubar = False
HideWindowUI = False
FitWindow = False
CenterWindow = False
PrintScaling = False
Left = 312
Top = 280
end
object frxRTFExport1: TfrxRTFExport
UseFileCache = True
ShowProgress = True
OverwritePrompt = False
DataOnly = False
PictureType = gpPNG
Wysiwyg = True
Creator = 'FastReport'
SuppressPageHeadersFooters = False
HeaderFooterMode = hfText
AutoSize = False
Left = 232
Top = 280
end
object frxCSVExport1: TfrxCSVExport
UseFileCache = True
ShowProgress = True
OverwritePrompt = False
DataOnly = False
Separator = ','
OEMCodepage = False
NoSysSymbols = True
ForcedQuotes = False
Left = 368
Top = 224
end
object frxBMPExport1: TfrxBMPExport
UseFileCache = True
ShowProgress = True
OverwritePrompt = False
DataOnly = False
Left = 136
Top = 272
end
object frxJPEGExport1: TfrxJPEGExport
UseFileCache = True
ShowProgress = True
OverwritePrompt = False
DataOnly = False
Left = 448
Top = 224
end
object frxGIFExport1: TfrxGIFExport
UseFileCache = True
ShowProgress = True
OverwritePrompt = False
DataOnly = False
Left = 40
Top = 272
end
object frxSimpleTextExport1: TfrxSimpleTextExport
UseFileCache = True
ShowProgress = True
OverwritePrompt = False
DataOnly = False
Frames = False
EmptyLines = False
OEMCodepage = False
DeleteEmptyColumns = True
Left = 48
Top = 216
end
object frxBarCodeObject1: TfrxBarCodeObject
Left = 40
Top = 104
end
object frxOLEObject1: TfrxOLEObject
Left = 128
Top = 104
end
object frxChartObject1: TfrxChartObject
Left = 216
Top = 104
end
object frxRichObject1: TfrxRichObject
Left = 288
Top = 104
end
object frxCrossObject1: TfrxCrossObject
Left = 368
Top = 104
end
object frxCheckBoxObject1: TfrxCheckBoxObject
Left = 464
Top = 104
end
object frxGradientObject1: TfrxGradientObject
Left = 40
Top = 152
end
end
untFastReport.pas文件:
{ *******************************************************
单元功用:
单元设计:陈新光
设计日期:2014-08-19
单元修改:
修改日期:
******************************************************* }
unit untFastReport;
interface
uses
System.SysUtils, System.Classes, Data.DB,
Datasnap.DBClient, frxClass, frxExportHTML, frxDBSet, frxchart,
frxExportXLS, frxExportMail, frxExportXML, frxExportPDF, frxExportText,
frxExportImage, frxExportCSV, frxExportRTF, Vcl.Dialogs, System.Variants,
frxBarcode, frxOLE, frxGradient, frxChBox, frxCross, frxRich;
type
TfrmFastReport = class(TDataModule)
report: TfrxReport;
DB: TfrxDBDataset;
ExpHtml: TfrxHTMLExport;
cds: TClientDataSet;
DB2: TfrxDBDataset;
cds2: TClientDataSet;
frxXLSExport1: TfrxXLSExport;
frxXMLExport1: TfrxXMLExport;
frxMailExport1: TfrxMailExport;
frxPDFExport1: TfrxPDFExport;
frxRTFExport1: TfrxRTFExport;
frxCSVExport1: TfrxCSVExport;
frxBMPExport1: TfrxBMPExport;
frxJPEGExport1: TfrxJPEGExport;
frxGIFExport1: TfrxGIFExport;
frxSimpleTextExport1: TfrxSimpleTextExport;
frxBarCodeObject1: TfrxBarCodeObject;
frxOLEObject1: TfrxOLEObject;
frxChartObject1: TfrxChartObject;
frxRichObject1: TfrxRichObject;
frxCrossObject1: TfrxCrossObject;
frxCheckBoxObject1: TfrxCheckBoxObject;
frxGradientObject1: TfrxGradientObject;
private
{ Private declarations }
public
{ Public declarations }
// 预备打印
procedure Prepare(const ReportModal: string;aCDS, aCDS2: TClientDataSet);
// 设置指定对象的值
procedure SetObjValue(const objName:string; value:Variant);
// 预览报表
procedure Preview;
// 直接打印报表
procedure Print;
// 设计报表
procedure DesignReport(const ReportModal: string);
end;
var
frmFastReport: TfrmFastReport;
implementation
{ %CLASSGROUP 'Vcl.Controls.TControl' }
uses untCommon;
{$R *.dfm}
{ TfrmFastReport }
{ -------------------------------------------------------------------------------
过程名: TfrmFastReport.ShowReport 打印报表
作者: hnxxcxg
日期: 2014.08.19
参数: isShow: Boolean; 是否预览
const ReportModal: string; 报表模板文件
aCDS,aCDS2: TClientDataSet; 报表数据集
const varNames: string; 报表变量
varValues: Variant 报表变量值
返回值: 无
------------------------------------------------------------------------------- }
procedure TfrmFastReport.DesignReport(const ReportModal: string);
begin
if ReportModal <> '' then
begin
report.LoadFromFile(ReportModal);
report.DesignReport();
end;
end;
procedure TfrmFastReport.SetObjValue(const objName: string; value: Variant);
begin
TfrxMemoView(report.FindObject(objName)).Memo.Text:= VarToStr(value);
end;
procedure TfrmFastReport.Prepare(const ReportModal: string;
aCDS, aCDS2: TClientDataSet);
begin
if aCDS <> nil then
cds.Data := aCDS.Data;
if aCDS2 <> nil then
cds2.Data := aCDS2.Data;
report.LoadFromFile(ReportModal);
report.PrepareReport(true);
end;
procedure TfrmFastReport.Preview;
begin
report.ShowReport;
end;
procedure TfrmFastReport.Print;
begin
report.Print;
end;
end.
通用FASTREPORT打印模块及接口方法的更多相关文章
- 在Ubuntu为Android硬件抽象层(HAL)模块编写JNI方法提供Java访问硬件服务接口(老罗学习笔记4)
在上两篇文章中,我们介绍了如何为Android系统的硬件编写驱动程序,包括如何在Linux内核空间实现内核驱动程序和在用户空间实现硬件抽象层接口.实现这两者的目的是为了向更上一层提供硬件访问接口,即为 ...
- 为Android硬件抽象层(HAL)模块编写JNI方法提供Java访问硬件服务接口
在上两篇文章中,我们介绍了如何为Android系统的硬件编写驱动程序,包括如何在Linux内核空间实现内核驱动程序和在用户空间实现硬件抽象层接 口.实现这两者的目的是为了向更上一层提供硬件访问接口,即 ...
- C#:使用FastReport打印带图片传参模板的实现方法
大家都知道,C#打印图片可以直接调用PrintDocument控件的PrintPage事件,通过画刷对image对象直接进行绘制.但是这种方法存在局限,例如如果打印的图片需要按纸张大小进行缩放的话,那 ...
- Python+request 分模块存放接口,多接口共用参数URL、headers的抽离,添加日志打印等《三》
主要介绍内容如下: 1.分模块存放接口 2.多接口共用参数URL.headers的抽离为配置文件 3.添加日志打印 4.一个py文件运行所有所测的接口 如上介绍内容的作用: 1.分模块存放接口:方便多 ...
- Winform开发框架之通用自动更新模块(转)
在网络化的环境中,特别是基于互联网发布的Winform程序,程序的自动更新功能是比较重要的操作,这样可以避免挨个给使用者打电话.发信息通知或者发送软件等,要求其对应用程序进行升级.实现程序的自动更新, ...
- Winform开发框架之通用附件管理模块 --SNF快速开发平台3.3-Spring.Net.Framework
最近项目太多都没有时间写文章了,实际项目需求一,CS端和windows平板都需要附件上传管理功能.以前做的都是BS的附件管理和上传功能.本来计划在Winform上嵌套一个浏览器直接用bs的附件上传功能 ...
- HTTP调用接口方法
1.创建接口调用方法类 package cn.com.victorysoft.sjzx.Message; import java.io.BufferedReader; import java.io.I ...
- python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheetahcherrypy:一个WEB frameworkctype ...
- 常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件 bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheetahcherrypy:一个WEB frameworkctyp ...
随机推荐
- 结构体struct和typedef后面接指针的含义
typedef struct file { ... }FileInfo, *FileP; 上述程序中定义了一个结构体,结构体的名字为file,并且给其指针 取个别名为FileP,所以后续程序中出现Fi ...
- git push default
今天使用git push的时候出现了如下提示: warning: push.default is unset; its implicit value is changing in Git 2.0 fr ...
- uva10375 Choose and divide
唯一分解定理. 挨个记录下每个质数的指数. #include<cstdio> #include<algorithm> #include<cstring> #incl ...
- Android ashmem hacking
/********************************************************************** * Android ashmem hacking * 声 ...
- android中ViewHolder通用简洁写法
public class ViewHolder { // I added a generic return type to reduce the casting noise in client ...
- DB2之隔离级别和锁的论述
在DB2数据库中, 是通过行级锁和表级锁协调作用来提供较好的并发性, 同时保证数据库中数据的安全. 在DB2中缺省情况下使用行级锁(当然需要IS/IX锁配合),只有当出现锁资源不足, 或者是用命令指定 ...
- C# Read/Write another Process' Memory z
http://www.codeproject.com/Articles/670373/Csharp-Read-Write-another-Process-Memory This article aim ...
- android 布局居中
android:layout_alignParentLeft="true" 位于父容器左上角 android:layout_alignParentBottom, android:l ...
- IOS 支付宝 SDK 申请
https://b.alipay.com/order/productDetail.htm?productId=2013080604609654&tabId=4#ps-tabinfo-hash
- 在eclipse.ini中指定jdk的方式
在eclisep的安装目录,打开eclipse.ini文件,加上这么一行,如下红色所示,注意加在-Vmargs前面,这两种方式的区别是:第二种方式除了会有eclipse进程外还会启动个java进程. ...