JDK 1.4.2 설치하기
http://java.sun.com/j2se/1.4.2/install-linux.html
http://java.sun.com/j2se/1.4.2/docs/index.html
http://java.sun.com/learning/tutorial/index.html
http://java.sun.com/j2se/1.4.2/download.html
-> J2SEv 1.4.2_08 SDK -> Download J2SE SDK 클릭
-> Accept -> Continue
-> Linux Platform -> self-extracting file (j2sdk-1_4_2_08-linux-i586.bin, 34.73 MB
마우스 오른쪽 클릭, 다른 이름으로 대상 저장
chmod +x j2sdk-1_4_2_08-linux-i586.bin
./j2sdk-1_4_2_08-linux-i586.bin
압축이 풀리면서 j2sdk1.4.2_08라는 디렉토리가 생성됨.
잘 되는 지, 테스트 해보기
mkdir -p /svc/neo/work/java_test
cd /svc/neo/work/java_test
vim HelloWorldApp.java
/**
* The HelloWorldApp class implements an application that
* simply displays "Hello World!" to the standard output.
*/
class HelloWorldApp {
public static void main(String[] args) {
System.out.println("Hello World!"); // Display "Hello World!"
}
}
( http://java.sun.com/docs/books/tutorial/getStarted/cupojava/unix.html )
/svc/neo/local/src/j2sdk1.4.2_08/bin/javac HelloWorldApp.java
/svc/neo/local/src/j2sdk1.4.2_08/bin/java HelloWorldApp
(/svc/neo/local/src/j2sdk1.4.2_08/bin/java HelloWorldApp.class라고 치면 안됨. "Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorldApp "라는 에러가 나게되어있음.)
댓글 없음:
댓글 쓰기