Add glassfishv3 to Windows Services

Source: Internet
Author: User
Tags glassfish

Run asadmin. Bat create-service on the command line.

Remember to run as an administrator.

In this way, the registered service may not be stopped when it is stopped, at least on win7. You need to manually execute the Stop command

I found that this problem is very serious, probably because my JDK is not an installed version. After the computer is restarted, if I do not log on, the service will still be unavailable.

Google. The solution is as follows:

1. Enter the command line as an administrator.

2. Delete the installed Service SC Delete domain1 (your service ID)

3. Go to glassfish \ Domains \ domain1 \ bin in the installation directory of glassfish.

4. Modify the domain1service. xml file, add <env name = "as_java" value = "D:/Java/jdk1.7.0 _ 05"/>, and set JDK. This line only needs to be a level-1 sub-tag of <service> </service>.

5. Return to the command line to add the service. The SC create service name-binpath = is the EXE file in the same directory as domain1service. xml. Write the file to determine the path.

In this way, the success is achieved.

Note-binpath = must be followed by spaces.

The above method adds glassfish to the service, and there is no problem. The following problem is that if you do not log on to the glassfish system after the restart, it will automatically start. This is because of JVM. So after glassfish is started, add it to the JVM option.

The parameter "-xrs" is enough.

On the Internet, it is also said that if it is a 2003 system

The glassfish \ Lib \ processlauncher. xml file, which is added to the <process name = "as9-server"> tag:

<Sysproperty key = "-xrs"/> --------------------------------- install. NET Framework on 2003, or report glassfish creation failure return 128
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.