java path on linux (ubuntu) - java

I try to build my app with phonegap. But when I type in command line "phonegap run android"
then I see this error:
Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-6-openjdk-amd64/lib/tools.jar
Buildfile: /home/beatnory/ReisWekker/platforms/android/build.xml
I think the problem is "ant". When I try to run that I see this
Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-6-openjdk-amd64/lib/tools.jar
When I take a look at "/usr/lib/jvm/java-6-openjdk-amd64/" I see this folder doesn't exsist.
the good path is "/usr/lib/jvm/java-7-openjdk-amd64/".
I added "PATH=${PATH}:~/usr/lib/jvm/java-7-openjdk-amd64/" to the "~/.bash_profile" file.
After I run ant he still use "/usr/lib/jvm/java-6-openjdk-amd64/".
How can I fix this?

Related

Debug OpenJDK14 using CLion: failed to load the CMake project

I download the source code of OpenJDK14 and put them in \home\yuanfang\jdk14 and after running bash configure --disable-warnings-as-errors and make images, I build OpenJDK14 successfully, The newly built JDK is in home\yuanfang\jdk14\build\linux-x86_64-server-release\jdk. By the way, I am using Ubuntu 20.04 LTS.
Then I want to debug OpenJDK14 using CLion IDE. I was using CLion 2020.2 and I take the following steps:
After open CLion I choose Create New CMake Project from Sources and choose the directory of \home\yuanfang\jdk14, which is the root directory of the jdk project.
I alter the Run/Debug Configurations to make it look like this:
CLion create a CMakeLists.txt automatically but the file doesn't work, so after googling I find find the correct CMakeLists.txt here at https://github.com/ojdkbuild/ojdkbuild/blob/master/src/java-14-openjdk/CMakeLists.txt. I then rewrite the old CMakeLists.txt using the correct one.
I download the whole repository(that is, github.com/ojdkbuild/ojdkbuild), unzip it and put it into \home\yuanfang\jdk14.
It looks like as follow, the ojdkbuild-master is the newly added folder.
I reload the CMake project, but some CMake error occurs(as follow), why can't CLion find those files? javaI googled but can't find any effective solution. Is there anything I can do or refer to? Thanks in advance.
CMake Error at CMakeLists.txt:19 (include):
include could not find load file:
/home/yuanfang/jdk14/../../resources/cmake/ojdkbuild_common.cmake
CMake Error at CMakeLists.txt:21 (include):
include could not find load file:
/home/yuanfang/jdk14/../../resources/cmake/version.cmake
CMake Error at CMakeLists.txt:93 (add_subdirectory):
add_subdirectory given source
"/home/yuanfang/jdk14/../../deps/rhino/scripting_tasks" which is not an
existing directory.
CMake Error at CMakeLists.txt:98 (ojdkbuild_add_subdirectory):
Unknown CMake command "ojdkbuild_add_subdirectory".
-- Configuring incomplete, errors occurred!
See also "/home/yuanfang/jdk14/cmake-build-debug/CMakeFiles/CMakeOutput.log".
Cannot get compiler information:
Compiler exited with error code 1: /usr/bin/cc -xobjective-c -I/home/yuanfang/jdk14/build/linux-x86_64-server-release/hotspot/variant-server/gensrc/adfiles......./loading/LibraryLoader/jar_src -g -fpch-preprocess -v -dD -E
Using built-in specs.
COLLECT_GCC=/usr/bin/cc
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-10ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 9.3.0 (Ubuntu 9.3.0-10ubuntu2)
COLLECT_GCC_OPTIONS='-I' '/home/yuanfang/jdk14/build/linux-x86_64-server-release/hotspot/variant-server/gensrc/adfiles' '-I' '......'-g' '-fpch-preprocess' '-v' '-dD' '-E' '-D' '___CIDR_DEFINITIONS_END' '-mtune=generic' '-march=x86-64'
cc1obj -E -quiet -v #/tmp/cci3XM6r -imultiarch x86_64-linux-gnu -D ___CIDR_DEFINITIONS_END /tmp/compiler-file5929385022787926768 -mtune=generic -march=x86-64 -fpch-preprocess -g -fworking-directory -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection -fcf-protection -dD
cc: fatal error: cannot execute 'cc1obj': execvp: No such file or directory
compilation terminated.
[Failed to reload]
step: check out this projecdt :https://github.com/ojdkbuild/ojdkbuild.git
step: put the source code of OpenJDK14 in ojdkbuild/src/
step: copy reousrces directory and CMakelists.txt to OpenJDK14
step: recomile openjdk and import project to CLin

CERTIFICATE_VERIFY_FAILED when trying to build java-cef

I'm trying to build java-cef on ubuntu following instructions from https://bitbucket.org/chromiumembedded/java-cef/wiki/BranchesAndBuilding.
At cmake step
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ..
i get
-- Downloading clang-format from Google Storage...
Failed to fetch file gs://chromium-clang-format/942fc8b1789144b8071d3fc03ff0fcbe1cf81ac8 for tools/buildtools/linux64/clang-format. [Err: /home/x/Desktop/jcef/src/tools/buildtools/external_bin/gsutil/gsutil_4.15/gsutil/third_party/boto/boto/pyami/config.py:71: UserWarning: Unable to load AWS_CREDENTIAL_FILE ()
warnings.warn('Unable to load AWS_CREDENTIAL_FILE (%s)' % full_path)
Failure: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727).
]
Terminal indicates that I'm using Python 2.7.15+.
How can i make it work? Many thanks.
In the folder where it has created the build jcef/src/tools/buildtools/download_from_google_storage.py change the version parameter of gsutil to a recent version, like 4.39. If you don't find specified file use a tool like find.

cannot find org.neo4j.batchimport

I am continuing to have trouble with the import.bat file for the Neo4j batch importer. I started a new thread as the original problem was resolved.
from the command prompt I run
import.bat test.db sample\nodes.csv sample\rels.csv
With some variations on the path listing for the files, including absolute paths. I continue to get the following error message
The system cannot find the path specified.
Error: Could not find or load main class org.neo4j.batchimport.Importer
I also tried running import.sh from Cygwin and in my Debian VM but keep getting the error
Error: Could not find or load main class org.neo4j.batchimport.Importer
What am I doing wrong?
Please download the zip-file, not the github clone.
This is a pre-build binary as outlined in the readme, that doesn't require that you have to have maven installed to build it.

Monodevelop + IKVM : Java build error ("Error: invalid path: *.class")

I am using the monodevelop Java plugin to compile a simple (hello world) Java project. The project is created fine, but when I try to build it I get the following error:
"Error: invalid path: *.class"
The command that triggers the error is as follows:
ikvmc -recurse:*.class -assembly:jTest -target:exe -debug -srcpath:/home/bob/src/jTest/jTest -r:mscorlib
Any idea what's going wrong, and how to fix this?
P.s. Please do not say "Mono is not for Java. Use (insert different Java IDE here) instead"
Thank you!
I think .\*.class sould be run better. There must at minimum one slash in the path.

Ghost4J. java.lang.UnsatisfiedLinkError: Unable to load library 'gsdll64'

I included Ghost4J 0.45 into my project using Maven and installed Ghostscript into C:\Program Files\gs\gs9.06.
But I still get an error java.lang.UnsatisfiedLinkError: Unable to load library 'gsdll64'.
I added into PATH env variable directory where located 'gsdll64.dll' (i.e. C:\Program Files\gs\gs9.06). Also tried launch application using -Djava.library.path=/path/to/dir.
But I alwways get UnsatisfiedLinkError (but when I launch using JVM argument -Djava.library.path I get ClassNotFound exception (Eclipse can't find Main class, but I manually point Eclipse to Main class when I laucnh my app))/
Does it work if you copy gsdll64 to your working directory? :-)
if u want to use a system property
-Djna.library.path=/path/to/dir should be used instead of -Djava.library.path=/path/to/dir

Categories

Resources