JAVA 컴파일 및 실행

LINUX 환경에서…

cd classes 한 후

#java 컴파일 (방법1)
/app/jdk/jdk1.7.0_80/bin/javac -d . -cp ../lib/*: /app/MINA-PROXY/src/org/apache/mina/proxy/*

#java 컴파일 (방법2)
/app/jdk/jdk1.7.0_80/bin/javac -Xlint -d . -cp ../lib/mina-core-2.0.13.jar:../lib/slf4j-api-1.7.21.jar: /app/MINA-PROXY/src/org/apache/mina/proxy/*

#실행실패
/app/jdk/jdk1.7.0_80/bin/java -Xms128m -Xmx256m -classpath .:./classes/org/apache/mina/proxy/*:./lib/*:./conf: org.apache.mina.proxy.Main

#정상실행 (방법1)
/app/jdk/jdk1.7.0_80/bin/java -Xms128m -Xmx256m -classpath .:./classes/:./lib/*:./conf: org.apache.mina.proxy.Main 8080 127.0.0.1 8021 30

#정상실행 (방법2)
/app/jdk/jdk1.7.0_80/bin/java -Xms128m -Xmx256m -cp .:./classes/:./lib/*:./conf: org.apache.mina.proxy.Main 8080 127.0.0.1 8021 30

 

실행시 classes 디렉토리이하에 있는 class 파일을 모두 적용하겠다고 아래처럼 * 를 넣으면 안된다.
/classes/: <– 이렇게 설정하면 된다.
-classpath .:./classes/*:

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s