Joke Collection Website - Public benefit messages - Using java programming to send messages through base stations? Who will?

Using java programming to send messages through base stations? Who will?

First, you must download several softwares: JDK, Apache and Tomcat. JDK(java Development Kit) is the foundation of all java applications, and it can be said that all java applications are built on it. It is a set of APIs, or some java classes. When I was studying JSP, the latest version was JDK 1. X version. Later, Sun (Sun Microelectronics, the development company of JAVA) suggested using. Now more people basically use J2EE. I believe everyone has heard that JAVA is highly portable and can be applied to various system platforms, so many enterprises also build JSP on LINUX for cost or security reasons. Some senior technicians think that LINUX+TOMCAT+APACHE is a perfect WEB platform. However, I think we should also take into account that there are not many technicians developing under LINUX, which is more difficult than the WINDOWS platform, and the development efficiency is greatly limited. Therefore, the later development and maintenance cost of building WEB on LINUX platform is actually very high, so I still want to talk about how to install JSP under WIN2000. One: JDK (or) installation and download can go to SUN official website to download or, and the usage is similar. Take JDK as an example to illustrate here: There are many places to download in java.sun.com and China. Under Windows, run. Exe file and install it in a directory, such as C:jdk. Select "My Computer" on the system desktop, right-click-Advanced-Environment Variable, press "New" in "System Variable", and enter: CLASSPATH, C:JDKLIBdt in the variable name. Variable values in JAR; C:JDKLIBTOOLS。 Jar; C: After configuring C:JDKBIN, restart the computer, and the environment variables will take effect. Test (1) uses a text editor to write a simple java program: public class hello world {public static void main (string args []) {system. out.println ("hello world!" ) ); }} This example is the famous "Hello World", and its function is to display "Hello World". Note: The file name must be "HelloWorld.java" and be case-sensitive. (2) Compile: execute at the dos command prompt: (Note the case) If the HelloWorld.java of javac is normal, the file HelloWorld.class will be generated. (3) Run: Execute at the dos command prompt: (note the case) java HelloWorld. Running java HelloWorld should produce a great "HelloWorld". At this point, you have successfully configured the JDK, but the JDK can't execute web scripts yet, and Tomcat needs to be reinstalled. Two: install Tomcat for beginners, to execute JSP and Servlet, Tomcat is a very good choice. Tomcat is the product of Apache organization, and sun Company supports it quite well. The download address is the official website of JAVA: jakarta.apache.org, and there are many in China. You can download it from this address: http://jakarta.apache.org/builds/tomcat/release/. After downloading, extract it into a directory, taking C:Tomcat as an example. Select "My Computer" on the configuration desktop, right-click-Advanced-Environment Variable, click "New" in "System Variable", enter JAVA_HOME in the variable name, and enter C:JDK in the variable value, and then confirm; Click "New" in "System Variable", enter: TOMCAT_HOME in the variable name, and enter: C: Tomcat in the variable value, and then confirm; Well, after the configuration is completed, the environment variables will not take effect until the computer is restarted. Note that for other Tomcat settings, you cannot change them unless necessary. If you are not sure about your change, it is still recommended not to change. There is one under test (1) starttomcat: c: tomcat in: startup.bat Run it and a Dos window will appear. (2) Browse in the browser and type: http://localhost:8080/ to see what effect it has (the default port of Tomcat is 8080, you can change it without conflict), and you should see a kitten or tiger running on this page. (3) There are JSP examples and Servlet examples. Well, test and run them yourself. (4) exit tomcat. C: there is one under Tomcat in: shutdown.bat Running it will close the Dos window (but I usually close this DOS window directly). If you just want to build a JSP server, this is ok. If you want to add database functions, you need to install and configure MYSQL or access other databases that meet open standards through JDBC.