(출처 : http://news.softpedia.com/news/How-to-Install-Java-in-Fedora-Core-6-39724.shtml)

By default, Fedora Core 6 systems come with an old Java software installed, so you need to install a newer version of Java Runtime Environment to enjoy all the Java applications out there. In this quick guide, I will teach you how to update/install your Java Environment.

Let's begin by downloading the latest version of JRE (Java Runtime Environment) from here. Just click on the Download link where it says Java Runtime Environment (JRE) 5.0 Update, then you’ll need to accept the license and download the Linux self-extracting file.

WARNING: Please remember to always replace the xx from the jre-1_5_0_xx-linux-i586.bin file with the latest version. At the moment of this guide’s writing, the latest version was 09, so the file should look like this: jre-1_5_0_09-linux-i586.bin

After you have finished downloading the file, you need to move it into the /opt folder. Open a console and type:

mv jre-1_5_0_xx-linux-i586.bin /opt

Now, you will need to make this file executable so you can extract it. Follow the commands below:

cd /opt - so you can go into the /opt directory
chmod +x jre-1_5_0_xx-linux-i586.bin

And now, let's run the executable file with the following command:

./jre-1_5_0_xx-linux-i586.bin

You'll be prompted with the License Agreement, hit space until you are asked if you agree or not. Type Yes and the extraction process will begin. After the extraction process is finished, just remove the binary file with the following command:

rm -rf jre-1_5_0_xx-linux-i586.bin

Now, let's put the Java plugin into your browser's plugin folder. Konqueror, Firefox and Mozilla browsers will all look into the same folder, for plugins. So type the following command:

ln -s /opt/jre1.5.0_xx/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins/libjavaplugin_oji.so

Well, now you need to make the Java executable available for the whole system, so you can run all the Java applications you encounter. Create the following file with your preferred text editor:

kwrite /etc/profile.d/java.sh

Now paste the following options into the file, remember to enter a carriage return after these lines, then save it. Remember to replace the xx with the latest version you have downloaded:

export J2RE_HOME=/opt/jre1.5.0_xx
export PATH=$J2RE_HOME/bin:$PATH


Now, type the following command to make that file available:

source /etc/profile.d/java.sh

Then type this command to see if the path is correct:

which java

You will see something like this: /opt/jre1.5.0_09/bin/java

Then type these commands:

/usr/sbin/alternatives --install /usr/bin/java java /opt/jre1.5.0_xx/bin/java 2
/usr/sbin/alternatives --config java

After you have entered the last command, you'll be asked to choose which Java software you want for your system. Just press 2 key and hit enter.

And finally, just type this command to see if everything looks good and your system has a new Java Environment:

/usr/sbin/alternatives --display java

And you can also type this command to see the version of your Java Runtime Environment:

java -version

Mine looks like this:

java version "1.5.0_09"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b01)
Java HotSpot(TM) Client VM (build 1.5.0_09-b01, mixed mode, sharing)


You should now be able to run most of the Java applications out there, with the commands like:

java -jar application.jar

or

javaws application.jnlp

Enjoy!
작업노트/LINUX l 2007. 6. 30. 02:47
error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory

해결책은...
root>#yum install libstdc++.so.5

출처 : Tong - ssabro님의 UNIX/Linux통

작업노트/Error Handling l 2007. 6. 27. 21:07

HTTP Status 500 -


type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '=5' at line 1
	org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:535)
	org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:433)
	org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
	org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
	org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)

root cause

com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '=5' at line 1
	com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
	com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2941)
	com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1623)
	com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1715)
	com.mysql.jdbc.Connection.execSQL(Connection.java:3243)
	com.mysql.jdbc.Connection.execSQL(Connection.java:3172)
	com.mysql.jdbc.Statement.executeQuery(Statement.java:1197)
	org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
	myclasses.BbsDAO.getArticle(BbsDAO.java:84)
	myclasses.BbsDAO.getArticle(BbsDAO.java:71)
	myclasses.BbsAction.execute(BbsAction.java:49)
	org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
	org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
	org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
	org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)

note The full stack trace of the root cause is available in the Apache Tomcat/5.5.17 logs.


mysql DB에서 rcount는 int(6)으로 되어있다.
그런데 DAO class 예제상의 코드에서는

long rcount = rs.getLong("rcount");
rs.updateLong("rcount", rcount+1);

이처럼 long형으로 처리하고 있다.
그래서 long->int로 바꾸었더니 자알~ 된다!

역시 책에 있는 예제라고 100% 믿을건 못되는 듯 하다.

작업노트/Error Handling l 2007. 6. 1. 02:16
1 ··· 32 33 34 35 36 37 38 39 

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

카테고리

분류 전체보기 (117)
작업노트 (98)
거미줄세상 (12)
쌓기 (1)
책읽기 (0)
Reviews (4)

달력

«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
get rsstistory! Tistory Tistory 가입하기!