For a programmer who has switched from C ++ to Java, it is also difficult to create java executable files. The project was left behind by a few colleagues. Several necessary library files and tools for creating executable files were encrypted and unblocked; I don't know if it is because the company's relationship with the previous colleagues is not well handled. In addition, the qq of the former colleagues
options here, select Search sequence. This is because we have to package the JDK environment so that the program can be used across platforms. First copy the JRE directory under your system's JDK to the "desktop \project\jre" in the output directory of your. exe file, and then go back to exe4j to remove all items from the list in the pop-up window. I have three items, a registry, a Java environment variable, a JDK environment variable, do not. Then c
available, then use this method to get ServletContext directly:Contextloader.getcurrentwebapplicationcontext (). Getservletcontext ()update20151228:When you write a file, you may need to obtain a path, such as when uploading a file that requires an output stream. the output stream cannot be obtained directly through ServletContext, but the actual path can be obtained directly. such as:Servletcontext.getrealpath ("/")The path obtained is the ${context}/path, and the output stream is obtained bas
on Types/methods/fields/constructors can also be modified and it's possible to Add/remove/change Valu Es in enum types.through your own attempts to discover the use of the spring-loaded project, you can actually implement a hot deployment of Java applications. The following describes how to introduce spring-loaded into a project. We can run the following code and then modify the A.say () method to see if it can be changed dynamically without restart
1:javac-d the compiled class file output directory Specifies the source file location. For exampleFor multiple packages under the source code compilation, it seems that Javac does not support iterative compilation, may need to pass through multiple source location to compile. One convenient way is to use the Windows Bat script or the Linux shell script as a compile source file list and then compile according to the source file manifest, for example:DIR/S/B *.
not available, then use this method to get ServletContext directly:Contextloader.getcurrentwebapplicationcontext (). Getservletcontext ()update20151228:When you write a file, you may need to obtain a path, such as when uploading a file that requires an output stream. The output stream cannot be obtained directly through ServletContext, but the actual path can be obtained directly. Such as:Servletcontext.getrealpath ("/")The path obtained is the ${context}/path, and the output stream is obtained
changed, after adding the build operation here Configuration Select Send Buiild artifacets over SSH(8) Enter the configurationName: is the name of the publish over SSH configuration that was just inside the system setupSource Filew: The location of the project Jar package, which Jenkins automatically packed and compiled in the target directoryRemove prefix: Remove prefix targetRemote directory: directory where the project jar package is stored remotelyExec Command: The shell script executed #这里
Recently, the project has been done for half a year to the final Test ready to go, after the flow of the process to start doing some performance testing, during this time to do a lot of performance optimization work, in this take notes, share. Exchange, hope that the same people have something new welcome to add. Do not do too much in this particular operation, mainly from the idea of starting.
Performance optimization is mainly from several aspects.
1. From the perspective of architectural desi
package MANIFEST.MFVi. Writing Start.bat ScriptsCreate a text file in the Zztest directory, add a piece of code inside it, save it after the name is Start.bat, save it, make sure to save it, such as:The final file structure ( If no external jar is referenced in the project, no fourth step, fifth step, only one Test01.jar and Start.bat):Double-click on the Start.bat to run, as the result. This is the end of Windows!Vii. start.sh startup scripting under LinuxThis article uses SECURECRT and SECURE
Several methods and examples for connecting to databases in Java projects1. The most primitive writing method (also for Beginners)First import the database to connect to the basic class, and then the other is simple. In actual operation, you only need to load the driver class and then call the SQL statement. The following is a simple program example.// Select. javaImport java.net. URL;Import java. SQL .*;Cl
presentation layer . The display layer converts VO to the DTO required by the service layer correspondence method and transmits it to the service layer. The service layer first constructs (or rebuilds) a do based on the data of the DTO , invoking the Do business method to complete the specific business. The service layer converts do to the PO that corresponds to the persistence layer (you can use the ORM tool or not), calls the persistence method of the persistent layer, passes the PO to it, an
1.new template for Java file/*** @Title: ${file_name}* @Copyright: Copyright (c) 2016* @Description:* * @Company: ucfgroup.com* @Created on ${date}${time}* @author [email protected]*/2.maven separate configuration, it is recommended not to use embedded3.team ignored resource The resources that were ignored when committingAdd Filter conditionsTarget. classpath. settings. Project4.javaScript validation all removed, do not let the IDE to verify JS, other
1, Java is a cross-platform, there is a problem in Linux, the main one is the file Read permission; The system environment variable setting under two checks can be!.profile correctlyJavaweb_ Deploy the Javaweb project developed on the Windows platform to the Linux platform steps: 1. On the Windows platform, package the project into a. war file by MyEclipse "file", "Export", 2, On the Windows platform, deleting. jar files in the. war file that are dupl
When using Android studio to compile into a jar, encountered gradle compilation errors, listen to the predecessors said that the JDK version is incorrect, and then updated the JDK, but maybe I reinstalled the JDK when the installation path changedConfigure the path in project structure, but still error: Gradle compile Java project times wrong: Could not find Tools.jarThis is because Gradle cannot find the JDK directory and can be resolved by setting t
the sql+mybatis logic tag.Logical label Understanding how people have used the template language freemarer or velocity should be easy to understand, that is, custom rules tagsHibernate is a bit more advanced, and it's simple, he uses annotations or configurations to configure entity and table fields in a way that dynamically generates SQL at startupYou can look at the open source project Minidao, you will know that the persistence layer originally written is very simple;So the architecture can
choice, such as the need to rely on the separation from the jar, the software can be started in *nix and Windows Script, and so on. Then use the Gradle application plugin to do it.In the Gradletest project, we made the following modifications to the SubPro1 build.gradle: Delete the jar task, add the application plugin, and configure the main class (the value of the Mainclassname is set). The result of the modification is as follows:apply plugin: ‘application‘mainClassName = ‘hello.HelloWorld‘de
1. Download Jettywget http://central.maven.org/maven2/org/eclipse/jetty/jetty-distribution/9.4.1.v20170120/ Jetty-distribution-9.4.1.v20170120.tar.gz2. Unzip the compressed fileTAR-ZXVF jetty-distribution-9.4.1.v20170120.tar.gz3. Setting the jetty Access portVim Start.iniHere I set the access port to 88884. Upload the war package to the WebApps directory5. Start JettyNohup java -jar start. Jar (running in the background) 6. Access AddressThe appea
Recently good busy good busy, sorting out the mood for everyone to share under their work encountered a little skill, hope to meet the same trouble students a little help.
We know that the Java Project War package can be automatically packaged in the Eclipse and MyEclipse tools, right, and then export the war package, but I found that one of my projects was a little bit of a hassle during the war package,
The project type of Java is set by a project file, which differs under different editor items.Under Eclipse is the. project file under IntelliJ, which is the project name. iml file,If you have just introduced the project in the editing of which there is no such file, it is your project is not approved by the editor of the project, a way to modify the format of the editor approved, generally through the import method will automatically add these files.
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.