linux - Trouble in Setting Java Environment Path on Ubuntu (libjvm.so: cannot open shared object file: No such file or directory) -
found solution!
ubuntu default ignore command "rd_library_path" therefore need add codes in ".bashrc" instead of "/etc/environment" or .profile.
it work fine!
i trying run program reads java method c/c++ code. (i made on windows successfully, now, working on linux)
i made compiled , run on ubuntu, however, problem is.. whenever try run program, have type following commands on terminal..
source /etc/environment ./invoke #program name invoke
if not type "source /etc/environment" every time boot pc, error message is...
error while loading shared libraries: libjvm.so: cannot open shared object file: no such file or directory
ok. here added in /etc/environment
export path="$path:/usr/lib/jvm/jdk1.7.0_25_x64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" export java_home=/usr/lib/jvm/jdk1.7.0_25_x64 export ld_library_path=$java_home/jre/lib/amd64:$java_home/jre/lib/amd64/server
what want that, know, want run program without typing "source /etc/environment". tried typing paths on /etc/profile, result same... should type "source /etc/profile" every time reboot pc..
how make permanently applied whole range of system without typing "source /etc/environment" stuffs everytime boot?
if need see source code of program, here downloadable address: http://cfile237.uf.daum.net/attach/247819495212df1c07b9eb
this worked me:
for x86:
export ld_library_path=/usr/lib/jvm/default-java/jre/lib/i386:/usr/lib/jvm/default-java/jre/lib/i386/server
for x86_64
export ld_library_path=/usr/lib/jvm/default-java/jre/lib/amd64:/usr/lib/jvm/default-java/jre/lib/amd64/server
Comments
Post a Comment