I was trying to compile cpp code which try to establish connection with oracle db. Everytime i got this error
g++:error:/u01/app/oracle/product/11.2.0/xe/lib/lclasses12.zip: Java compiler not installed on this system.
The command which am i executing is given below-
/opt/rh/devtoolset-2/root/usr/bin/g++ -L $ORACLE_HOME/lib/* -L $ORACLE_HOME/rdbms/lib/* cpp_db_conn.cpp
Although when i check java version and javac version i got this
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)
我试图编译尝试与oracle db建立连接的cpp代码。每次我收到此错误g ++:错误:/u01/app/oracle/product/11.2.0/xe/lib/lclasses12.zip:此系统上未安装Java编译器。我执行的命令如下 - / opt / rh / devtoolset-2 / root / usr / bin / g ++ -L $ ORACLE_HOME / lib / * -L $ ORACLE_HOME / rdbms / lib / * cpp_db_conn.cpp虽然当我检查java版本和javac版本我得到了这个java -version java版本“1.8.0_121”Java(TM)SE运行时环境(版本1.8.0_121-b13)Java HotSpot(TM)64位服务器VM(版本25.121-b13,混合模式)
javac -version
javac 1.8.0_121
I don't understand why it's not able to find java compiler on the system.
javac -version javac 1.8.0_121我不明白为什么它无法在系统上找到java编译器。
1 个解决方案
#1
0
I resolved it.g++ was trying to find gcj(java-compiler embedded with g++) which was missing.So installed it externally using this command-yum install libgcj yum install java-1.5.0-gcj-devel
我解决了它.g ++试图找到缺少的gcj(嵌入了g ++的java编译器)。所以使用这个命令在外部安装它。如下安装libgcj yum install java-1.5.0-gcj-devel
#1
0
I resolved it.g++ was trying to find gcj(java-compiler embedded with g++) which was missing.So installed it externally using this command-yum install libgcj yum install java-1.5.0-gcj-devel
我解决了它.g ++试图找到缺少的gcj(嵌入了g ++的java编译器)。所以使用这个命令在外部安装它。如下安装libgcj yum install java-1.5.0-gcj-devel