【问题标题】:Adding GlassFish Server 4.1 to NetBeans IDE 7.4将 GlassFish Server 4.1 添加到 NetBeans IDE 7.4
【发布时间】:2015-10-03 15:17:49
【问题描述】:

我已经安装了 NetBeans IDE。还下载了 GlassFish Server 并将其解压缩,当我在 NB 上添加安装位置时,它显示“不是有效的 GlassFish Server 安装。”

【问题讨论】:

    标签: netbeans glassfish netbeans-7 glassfish-4


    【解决方案1】:

    可能最简单的解决方案是创建一个新文件夹,然后选择它。单击“接受许可证...”上的复选框,然后在“添加服务器”对话框中再次下载它,这样它就必须放在 Netbeans 放置的位置。

    检查为什么以前的下载不起作用。它检查的文件应位于您指定目录的以下子目录中。

    ./glassfish/config/glassfish.container
    

    也就是说,如果我指定/opt/glassfish4,那么/opt/glassfish4/glassfish/config/glassfish.container 应该存在。

    文件应如下所示:

    #
    # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    #
    # Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
    #
    # The contents of this file are subject to the terms of either the GNU
    # General Public License Version 2 only ("GPL") or the Common Development
    # and Distribution License("CDDL") (collectively, the "License").  You
    # may not use this file except in compliance with the License.  You can
    # obtain a copy of the License at
    # https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
    # or packager/legal/LICENSE.txt.  See the License for the specific
    # language governing permissions and limitations under the License.
    #
    # When distributing the software, include this License Header Notice in each
    # file and include the License file at packager/legal/LICENSE.txt.
    #
    # GPL Classpath Exception:
    # Oracle designates this particular file as subject to the "Classpath"
    # exception as provided by Oracle in the GPL Version 2 section of the License
    # file that accompanied this code.
    #
    # Modifications:
    # If applicable, add the following below the License Header, with the fields
    # enclosed by brackets [] replaced by your own identifying information:
    # "Portions Copyright [year] [name of copyright owner]"
    #
    # Contributor(s):
    # If you wish your version of this file to be governed by only the CDDL or
    # only the GPL Version 2, indicate your decision by adding "[Contributor]
    # elects to include this software in this distribution under the [CDDL or GPL
    # Version 2] license."  If you don't indicate a single choice of license, a
    # recipient has the option to distribute your version of this file under
    # either the CDDL, the GPL Version 2 or to extend the choice of license to
    # its licensees as provided above.  However, if you add GPL Version 2 code
    # and therefore, elected the GPL Version 2 license, then the option applies
    # only if the new code is made subject to such option by the copyright
    # holder.
    #
    containers=jruby, web, php
    jruby.application=app/controllers/application.rb
    web.application=WEB-INF/web.xml
    php.urlpattern=.*php$
    

    更新

    我错过了您的 Netbeans 的版本号。对于 Netbeans 7.4,您似乎需要使用 Glassfish 4.0,因此请将您的 Netbeans 升级到 8.02 或下载旧版本的 Glassfish。

    【讨论】:

    • 非常感谢,我是新手,这对我很有帮助。希望您能尽快帮助我解决有关 Java 的其他问题。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-09-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多