備忘録
おかしいな。
どこがいけないんだろう。
@debian:~$ cd ./Desktop
@debian:~Desktop$ wget http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jdk-6u6-linux-i586.bin?BundledLineItemUUID=zwVIBe.m7zIAAAEaME4M.n3m&OrderID=CBhIBe.mAE0AAAEaI04M.n3m&ProductID=VXZIBe.ootIAAAEZTrBAkQve&FileName=/jdk-6u6-linux-i586.bin
@debian:~$ ../
@debian:~$ su
Password:
@debian:~# mkdir /usr/local/java
@debian:~# cp /home/<Users>/Desktop/jdk-6u6-linux-i586.bin /usr/local/java/
@debian:~# chmod 777 /usr/local/java/jdk-6u6-linux-i586.bin
@debian:~# ./usr/local/java/jdk-6u6-linux-i586.bin
Yes [or] No
y
Done.
@debian:~# vi /etc/bash.bashrc
# INS START 20080613
export JAVA_HOME=/usr/local/java/jdk1.6.0_06
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar
# INS END 20080613
@debian:~$ mkdir java
@debian:~$ cd java
@debian:~/java$ vi Sample.java
public class Sample{
public static void main(String[] args){
System.out.println("Hello World!!");
}
}
@debian:~/java$ javac Sample.java
@debian:~/java$ java Sample
Exception in thread "main" java.lang.ClassFormatError: Sample (unrecognized class file version)
at java.lang.VMClassLoader.defineClass(libgcj.so.70)
at java.lang.ClassLoader.defineClass(libgcj.so.70)
at java.security.SecureClassLoader.defineClass(libgcj.so.70)
at java.net.URLClassLoader.findClass(libgcj.so.70)
at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.70)
at java.lang.ClassLoader.loadClass(libgcj.so.70)
at java.lang.ClassLoader.loadClass(libgcj.so.70)
at gnu.java.lang.MainThread.run(libgcj.so.70)
@debian:~/java$
おかしいな。
どこがいけないんだろう。
@debian:~$ cd ./Desktop
@debian:~Desktop$ wget http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jdk-6u6-linux-i586.bin?BundledLineItemUUID=zwVIBe.m7zIAAAEaME4M.n3m&OrderID=CBhIBe.mAE0AAAEaI04M.n3m&ProductID=VXZIBe.ootIAAAEZTrBAkQve&FileName=/jdk-6u6-linux-i586.bin
@debian:~$ ../
@debian:~$ su
Password:
@debian:~# mkdir /usr/local/java
@debian:~# cp /home/<Users>/Desktop/jdk-6u6-linux-i586.bin /usr/local/java/
@debian:~# chmod 777 /usr/local/java/jdk-6u6-linux-i586.bin
@debian:~# ./usr/local/java/jdk-6u6-linux-i586.bin
Yes [or] No
y
Done.
@debian:~# vi /etc/bash.bashrc
# INS START 20080613
export JAVA_HOME=/usr/local/java/jdk1.6.0_06
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar
# INS END 20080613
@debian:~$ mkdir java
@debian:~$ cd java
@debian:~/java$ vi Sample.java
public class Sample{
public static void main(String[] args){
System.out.println("Hello World!!");
}
}
@debian:~/java$ javac Sample.java
@debian:~/java$ java Sample
Exception in thread "main" java.lang.ClassFormatError: Sample (unrecognized class file version)
at java.lang.VMClassLoader.defineClass(libgcj.so.70)
at java.lang.ClassLoader.defineClass(libgcj.so.70)
at java.security.SecureClassLoader.defineClass(libgcj.so.70)
at java.net.URLClassLoader.findClass(libgcj.so.70)
at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.70)
at java.lang.ClassLoader.loadClass(libgcj.so.70)
at java.lang.ClassLoader.loadClass(libgcj.so.70)
at gnu.java.lang.MainThread.run(libgcj.so.70)
@debian:~/java$