Last active
May 19, 2017 12:23
-
-
Save ponsuke0531/693054b604668a5527406f24e73f6232 to your computer and use it in GitHub Desktop.
GlassFishを起動しようとしたら java.lang.UnsupportedClassVersionError: org/glassfish/admin/cli/AsadminMain : Unsupported major.minor version 51.0 となってしまった時の対応方法 ref: http://qiita.com/ponsuke0531/items/bf2a07c37f30318f76ff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ /c/app/glassfish-4.1.2/glassfish4/glassfish/bin/asadmin | |
java.lang.UnsupportedClassVersionError: org/glassfish/admin/cli/AsadminMain : Unsupported major.minor version 51.0 | |
at java.lang.ClassLoader.defineClass1(Native Method) | |
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) | |
at java.lang.ClassLoader.defineClass(ClassLoader.java:615) | |
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) | |
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) | |
at java.net.URLClassLoader.access$000(URLClassLoader.java:58) | |
at java.net.URLClassLoader$1.run(URLClassLoader.java:197) | |
at java.security.AccessController.doPrivileged(Native Method) | |
at java.net.URLClassLoader.findClass(URLClassLoader.java:190) | |
at java.lang.ClassLoader.loadClass(ClassLoader.java:306) | |
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) | |
at java.lang.ClassLoader.loadClass(ClassLoader.java:247) | |
Could not find the main class: org.glassfish.admin.cli.AsadminMain. Program will exit. | |
Exception in thread "main" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM Always use JDK 1.6 or higher | |
REM Depends on Java from ..\config\asenv.bat | |
VERIFY OTHER 2>nul | |
setlocal ENABLEEXTENSIONS | |
if ERRORLEVEL 0 goto ok | |
echo "Unable to enable extensions" | |
exit /B 1 | |
:ok | |
call "%~dp0..\config\asenv.bat" | |
if "%AS_JAVA%x" == "x" goto UsePath | |
set JAVA="%AS_JAVA%\bin\java" | |
goto run | |
:UsePath | |
set JAVA=java | |
:run | |
%JAVA% -jar "%~dp0..\lib\client\appserver-cli.jar" %* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ java -version | |
java version "1.6.0_45" | |
Java(TM) SE Runtime Environment (build 1.6.0_45-b06) | |
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ java -version | |
java version "1.8.0_121" | |
Java(TM) SE Runtime Environment (build 1.8.0_121-b13) | |
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ /c/app/glassfish-4.1.2/glassfish4/glassfish/bin/asadmin start-domain domain1 | |
Attempting to start domain1.... Please look at the server log for more details..... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment