Tomcat develops remote debug ports and uses Eclipse for remote debugging

Source: Internet
Author: User

One, Tomcat development remote debugging Port Method 1

  Win system

In the Catalina.bat:
SET Catalina_opts=-server-xdebug-xnoagent-djava.compiler=none-xrunjdwp:transport=dt_socket,server=y,suspend=n, address=8899

  Linux Systems

In the catalina.sh:
Catalina_opts= "-server-xdebug-xnoagent-djava.compiler=none-xrunjdwp:transport=dt_socket,server=y,suspend=n, address=8899 "

Method 2

  Win system
Create a new Debug.bat in the bin directory under the Tomcat directory, and edit the contents as follows
Set jpda_address=8000
Set Jpad_transport=dt_socket
SET Catalina_opts=-server-xdebug-xnoagent-djava.compiler=none-xrunjdwp:transport=dt_socket,server=y,suspend=n, address=8899
Startup
Double-click Debug.bat

  Linux Systems
The last line in startup.sh exec "$PRGDIR"/"$EXEXUTABLE" start "[email protected]" is modified to
JPDA start, the default debug port is 8000 and can be set in the catalina.sh file jpda_appdess=8000
Start Tomcat with startup.sh or catalina.sh jpda start

above Source: http://www.cnblogs.com/dyllove98/archive/2013/08/01/3230824.html      if not, try the following:Declare-x catalina_opts= "-server-xdebug-xnoagent-djava.compiler=none-xrunjdwp:transport=dt_socket,server=y, suspend=n,address=8899 "Second, remote debugging with Eclipse

  1. Right-click Project->debug as->debug configurations. (or menu bar run->debug configurations ...)

2. Double-click Remote Java Application (new)

  

  3. Complete the corresponding configuration, you can specify a specific debugging project (also can not specify)

  

  4. Specify the source code for a part of a remote project

  

5. Click the Debug button to enter the remote debugging state

To access remote engineering services, local Eclipse debugging can be broken to the point where the breakpoint is set.

Third, Java implementation video editing function

These two days from the female ticket to see the implementation of the code through Java video operation, and then studied. By the way to share this tool with everyone!

Here I just realized the function of video segmentation, very simple. The program entry functions are as follows:

  Convertvideo.java

 Public Static voidMain (string[] args) {/** Convertvideo video = null;          * String uploadPath1 = Fileoperator.getfileprefix ("D:\\doc\ * 201_wkgk8lg0fv6acgxfetv1qlvz9l4075.mp4 * * ") +". flv "; Video = new * Convertvideo ("D:\\doc\\201_wkgk8lg0fv6acgxfetv1qlvz9l4075.mp4 * *", uploadPath1, S         Ystemconfig.getsystemconfig ("Ffmpegtools"));         * Video.ffmpegtransvideo (); */                FinalString Source = "C:/users/administrator/desktop/video.avi"; FinalString target = "D:/zzz/lala"; Final intAvertime = 5; File Toolfile=NewFile (Convertvideo.class. GetResource ("/"). GetFile ()); FinalString Converttool = toolfile.getparent () + "/tools/ffmpeg.exe"; System.out.println (">>> If the default conversion tool path does not exist, please specify!!!"); System.out.println (">>> Conversion Tool Path:" +Converttool);    Hjzggcut (source, Target, Converttool, avertime); }

Here, you only need to specify three parameters , the source file path of the video, the destination path (no filename suffix is required), the split interval (in seconds), the FFmpeg tool path.

 Of course there are many other operations, if you are interested, you can change it, or do a graphical operation tool.

  Source Download : Https://github.com/hjzgg/video_hjzgg

Tomcat develops remote debug ports and uses Eclipse for remote debugging

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.