Presentation is loading. Please wait.

Presentation is loading. Please wait.

Plug-in Development Environment. Session Outline Tools Installation Configuration New Project Basic Debugging Remote Debugging.

Similar presentations


Presentation on theme: "Plug-in Development Environment. Session Outline Tools Installation Configuration New Project Basic Debugging Remote Debugging."— Presentation transcript:

1 Plug-in Development Environment

2 Session Outline Tools Installation Configuration New Project Basic Debugging Remote Debugging

3 Tools Install a JDK (if needed) – J2SE downloadsJ2SE downloads Install Integrated Development Environment (IDE) –Using Eclipse as an example Free Fully featured Eclipse download –Other IDEs available JBuilder NetBeans IntelliJ

4 Installation Use an application that handles zip files, such as WinZip or Windows Explorer, to extract the Eclipse files into a folder.

5 Installation Install Tomcat plug-in for Eclipse –Tomcat plug-in.Tomcat plug-in –Allows Tomcat to run in the context of the IDE. –Configure the plug-in to use CenterView’s Tomcat installation.

6 Installation Unzip the Tomcat plug-in into the Eclipse dropins folder.

7 Configuration Start Eclipse (eclipse/eclipse.exe). Choose a workspace.

8 Configuration Go to the workbench.

9 Configuration Select Preferences from the Window menu.

10 Configuration Select the Tomcat preferences, set Version 5.x, and browse to the Tomcat of your CenterView installation. Then click OK.

11 New Project Create a new project in Eclipse –Plug-in source code is part of this project. –Builds the CenterView plug-in (class files). –Set as a Tomcat project (if needed).

12 New Project Select Java Project from the drop-down.

13 New Project Type the project name and click Finish.

14 New Project Create a CenterView plug-in file –Configure the external JARs. –Create the package. –Create the new class.

15 New Project Select Properties > Java Path from the Project menu, then add the API JARs using Add External JARs and navigating to CenterView folder/Server/plugins/lib/api.

16 New Project Create a new package by expanding the project, right-clicking src, then clicking New > Package.

17 New Project Type the package name and click Finish.

18 New Project Two options with class file location –Local to Project Already configured for it. Must copy to another directory to use. –Local to CenterView Advanced configuration. No need to copy class files.

19 Basic Debugging Start the database. Start the Eclipse IDE. Start Tomcat from the IDE. Put a breakpoint in the plug-in code. Display the dashboard item that is associated with the plug-in (preview in browser or select in Builder). Control returns to the IDE to allow debugging.

20 Basic Debugging Since you are not using the batch file to start CenterView Server, you need to start the database separately. To start Postgres separately: –Navigate to CenterView folder/Pgsql. –Run postgresql start. If you are using another database, it needs to be running.

21 Basic Debugging Alternately, you can set up an External Tool Configuration.

22 Basic Debugging Browse the file system to locate the postgresql script file, add start to the Arguments list, give it a name, then click Apply.

23 Basic Debugging Start Tomcat by selecting the Tomcat Start button on the tool bar.

24 Basic Debugging Select a Java file in your package, then double-click in the gray bar to add a breakpoint at a specific line in the code.

25 Basic Debugging The IDE switches to a Debug perspective when a breakpoint is hit.

26 Remote Debugging IDEs also have the ability to remotely debug a process –Requires the JVM of the process to be debugged to start with certain flags set (Tomcat Startup script). –IDE needs to connect to this process to debug.

27 Remote Debugging Tomcat Startup (Windows version) SET INSTALLDIR=C:\PDE\CenterView3 SET JAVA_HOME=%INSTALLDIR%\jre SET CATALINA_HOME=%INSTALLDIR%\Tomcat SET CATALINA_BASE=%INSTALLDIR%\Tomcat SET JAVA_OPTS=-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties - Djava.endorsed.dirs=%CATALINA_HOME%\common\endorsed - Dcatalina.base=%CATALINA_BASE% -Dcatalina.home=%CATALINA_HOME% - Djava.io.tmpdir=%CATALINA_BASE%\temp SET JAVA_DEBUG=-Xdebug - Xrunjdwp:transport=dt_socket,address=8787,suspend=n,server=y %JAVA_HOME%\bin\java -cp %CATALINA_HOME%\bin\bootstrap.jar;%CATALINA_HOME%\bin\commons- logging-api.jar %JAVA_OPTS% %JAVA_DEBUG% org.apache.catalina.startup.Bootstrap

28 Remote Debugging Optionally, you can modify the CenterView3/Tomcat/TomcatLauncher.properties file and add the following line: Application.commandline.options=-Xdebug;- Xrunjdwp:transport=dt_socket,server=y,suspend=n, address=8787

29 Remote Debugging Select Debug Configurations from the Debug tool bar drop-down.

30 Remote Debugging Select Remote Java Application from the list. Click the New button in the Content pane. Change the configuration name and the port, then browse for the current project. Click Apply to save the changes.

31 Remote Debugging

32 When debugging remotely: –Start the database. –Start Tomcat using the script. –Start the IDE. –Select Debug Configuration from the Debug tool bar drop-down. –Set breakpoints in code. –Display the dashboard in the browser.

33 Additional Resources Corda Connection – Visual Evolution 2008 –Go to portal.corda.comportal.corda.com –Login –Resources –Visual Evolution 2008 Other VE topics

34


Download ppt "Plug-in Development Environment. Session Outline Tools Installation Configuration New Project Basic Debugging Remote Debugging."

Similar presentations


Ads by Google