我已经安装了NetBeans IDE。还下载了GlassFish Server并将其解压缩,当我在NB上添加安装位置时,它说“不是有效的GlassFish Server安装。”
答案 0 :(得分:0)
可能最简单的解决方案是创建一个新文件夹,选择它。单击“接受许可证...”上的复选框,然后在“添加服务器”对话框中再次下载,这样就必须是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。