I am trying to run a program which is executed by running the following batch file:
#echo off
rem Add extra JVM options here
set OPTS=-Xms64m -Xmx256m
rem Build command line arguments
set CMD_LINE_ARGS=%1
if ""%1""=="""" goto doneStart
shift
:setupArgs
if ""%1""=="""" goto doneStart
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
shift
goto setupArgs
:doneStart
rem Launch the DCS
java %OPTS% -Djava.ext.dirs=lib -Ddcs.war=war/carrot2-dcs.war org.carrot2.dcs.DcsApp
%CMD_LINE_ARGS%
This batch file sets up the program at http://localhost:8080 (I believe it's a servlet). The program is a cluster engine similar to the one here: http://search.carrot2.org/stable/search. Everything seems to work, but I get the following command prompt output from executing the batch file.
[INFO] Starting DCS...
[INFO] Native LAPACK not available: no nni_lapack in java.library.path
[INFO] Native BLAS not available: no nni_blas in java.library.path
[INFO] DCS started on port: 8080
I managed to find the LAPACK and BLAS libraries online, but how do I add them to java.library.path (and how do I find what java.library.path points to)?
If anyone who'd like to help me needs some additional information or clarification, please let me know. I'm pretty new to java web development.
java.library.path is used by Java to find native libraries (dlls on Windows). You need to download LAPACK and BLAS libraries somewhere (e.g. in C:\path\lapack\lib and C:\path\blas\lib). You then need to set java.library.path appropriately when you call your program. For example:
java %OPTS% -Djava.library.path=C:\path\lapack\lib;C:\path\blas\lib -Djava.ext.dirs=lib -Ddcs.war=war/carrot2-dcs.war org.carrot2.dcs.DcsApp
You can try:
SET PATH=<path>/lapack.dll;<path>/blas.dll
Related
RPI 2B, running Debian/Jessie, with java version 1.8.0_65.
Downloaded latest nukkitx from https://nukkitx.com.
Followed installation instructions at https://github.com/IntellectualCrafters/PlotSquared/wiki/Installation.
Plugins I have installed:
Plot Squared 18.07.21-aaa7088-2022
FastAsyncWorldEdit 18.07.21-a00345f-1159-20.4.0
DbLib 0.2.3
Error I am encountering:
java.lang.UnsatisfiedLinkError: org.sqlite.core.NativeDB._open(Ljava/lang/String;I)V
Stack trace: https://pastebin.com/C3DrUm0Q.
Full server log: https://pastebin.com/2iuvQmbC.
As you can see, it says that PlotSquared has been loaded, but none of the plot commands are available. It just says unknown command when I type it. I have tried several different versions of all of the plugins, and a couple previous versions of nukkitx, all have the same problem. I'm thinking its something about my device, but I'm still pretty new to Linux and am not sure what to try next. Any suggestions would be amazing!
EDIT: I download the driver from https://github.com/xerial/sqlite-jdbc, and added it to the class path when calling the nukkitx jar to start the server. This didn't fix the problem. Here is the .sh file to start the nukkit jar:
#!/bin/sh
echo $USER
java -Xms1G -Xmx1G -cp ".;sqlite-jdbc-3.23.1.jar" -jar nukkit-1.0-SNAPSHOT.jar
I figured it out! For whatever reason, the JbLib sqlite driver apparently wasn't working. The solution was to remove JbLib (jar and folder) from the plugins folder, change the start.sh file (which I created according to the installation instructions) to use a classpath command instead of a jar command, add the xerial sqlite driver to the class path, and specify the Main Nukkit class to execute, like so:
java -classpath nukkit-1.0-SNAPSHOT.jar:sqlite-jdbc-3.23.1.jar cn.nukkit.Nukkit
I am starting to learn cassandra and downloaded the file from the Apache Cassandra. When I navigated through the bin folder of the apache-cassandra-2.2.1/bin and run the command cassandra it gives me the error saying Unable to find java executable. Check JAVA_HOME and PATH environment variables.
But at the same path when I hit java I am able to see the java is accessible there. What should I do to get rid of this? I am using Windows OS.
Edit:
I rather used Datastax windows installer and now I see no error in running cqlsh.
I was also facing the same problem. Actually, somewhere in installation scripts it adds "bin/java" to "$JAVA_HOME". In my case, java path was "/usr/bin/java" so I had to configure $JAVA_HOME=/user.
export JAVA_HOME=/usr/
Set JAVA_HOME:
Right click My Computer and select Properties.
On the Advanced tab, select Environment Variables, and then edit JAVA_HOME to point to where the JDK software is located, for example, C:\Program Files\Java\jdk1.6.0_02.
FROM:
http://docs.oracle.com/cd/E19182-01/820-7851/inst_cli_jdk_javahome_t/index.html
login with root because Cassandra will start with the root
readlink -f $(which java)
vi ~/.bashrc
source ~/.bashrc
please note: java version should be same on cluster nodes
BR// nitin.k
I have came across this problem while installing rJava on R3.0.1:
"configure: error: One or more JNI types differ from the corresponding native type"
The detailed message is attached below.
I searched for similar problems but my issue is a little trickier and many proposed solutions either didnt work or I could not try, because I am working on a server which I do not have write access to system libraries.
OS: Linux 2.6.18-348.6.1.el5 #1 SMP Tue May 21 15:44:27 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux (info given by typing "uname -a" sorry I couldn't quite understand this info)
R: R3.0.1, I downloaded the source, put in my home directory, and built R from source.
rJava: I ran 'install.packages("rJava")', during installation I got:
=========================
checking Java support in R... present:
interpreter : '/usr/bin/java'
archiver : '/usr/bin/jar'
compiler : '/usr/bin/javac'
header prep.: '/usr/bin/javah'
cpp flags : '-I/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/../include -
I/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/../include/linux'
java libs : '-L/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/amd64/se
rver -ljvm'
checking whether JNI programs can be compiled... yes
checking JNI data types... configure: error: One or more JNI types differ from the corresponding native type. You may need to use non-standard compiler flags or
a different compiler in order to fix this.
ERROR: configuration failed for package 'rJava'
* removing '/home/me/R-3.0.1/library/rJava'
==================================
Since I can only access the server remotely, I do not have write access to anything outside my home directory /home/me.
Any information would be highly appreciated!
I ran into the same problem trying to install.packages("rJava") in R version 3.0.2, as long as I tried to install as ordinary user (Linux, Debian). There was no problem running install.packages("rJava") as root. Then, trying library(rJava) worked for root but not for me as a user:
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/usr/usr.local.original.Debian/lib/R/site-library/rJava/libs/rJava.so':
libjvm.so: cannot open shared object file: No such file or directory
This problem required to add the environment variables JAVA_HOME and LD_LIBRARY_PATH
to ~/.login (following instructions found at Trouble in Setting Java Environment Path on Ubuntu (libjvm.so: cannot open shared object file: No such file or directory)):
setenv JAVA_HOME /usr/lib/jvm/java-7-oracle/
setenv LD_LIBRARY_PATH $JAVA_HOME/jre/lib/amd64:$JAVA_HOME/jre/lib/amd64/server
# For c-shell; for bash, it would have to be:
export JAVA_HOME=/usr/lib/jvm/java-7-oracle/
export LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/amd64:$JAVA_HOME/jre/lib/amd64/server
So, you would have to have a system administrator install rJava for you, then set your environment variables and, of course, set your own .libPaths() in R such as to find rJava.
I hit the same issue on my mac OSx El Capitan. I tried updating the java paths/envs used by R using "R CMD javareconf" with no effects.
Finally, I saw that when I ran "R CMD javareconf" my Java library path: in the output was empty. By digging up further I figured out that my JAVA_HOME was not set correctly as pointed here https://stackoverflow.com/a/3311983 . I had to add an extra /jre in the JAVA_HOME path.
Using linux, specifically, 64 bit Gentoo, my solution was to add the following line to /etc/env.d/20java-config
LD_LIBRARY_PATH="/etc/java-config-2/current-system-vm/jre/lib/amd64:/etc/java-config-2/current-system-vm/jre/lib/amd64/server"
Then
Run env-update
source /etc/profile
start rstudio (or if you are using GUI menu, logout and login to load the environment)
The above change needs to be made by root but then will apply to non-root users who use the same system, on next login.
Basically, rJava conf test was failing to find libjvm.so, the conftest program would compile but not link :)
I am trying to make a PhoneGap package for Symbian. I've installed Cygwin with the "make" package. and when I'm typing "make on the symbian folder it gives me this error:
cp lib/phonegap.js framework/www/phonegap.js
cd framework/ && zip -r app.zip www/* -x www/wrt_preview_frame.html www/wrt_prev iew_main.html www/preview/ www/*.wgz
cygwin warning:
MS-DOS style path detected: /usr/local/bin/C:\Program
Preferred POSIX equivalent is: /usr/local/bin/C:/Program
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
Can't find C:\Program on PATH.
Makefile:28: recipe for target `package' failed
make: *** [package] Error 29
My PhoneGap folder is directly on the C: drive and without any spaces. Any ideas?
I think you have in your PATH the Symbians tools which contains the make tool, so you are not executing cygwin's make.
First check what make you are executing
type make
If you get something like this:
/cygdrive/c/Program Files (x86)/Common Files/Symbian/tools/make
Then it means your PATH is wrong and you aren't executing the correct make.
Be sure to have installed the Cygwin's make package and modify your PATH so it takes the correct "make".
I've solved this problem by adding Java Runtime Environment path to Windows environment Variables after installing latest copy of cygwin. (eg. C:\Program Files\Java\jre6\bin)
why the error occurs when i am starting the jboss server 6.0 ?
'findstr' is not recognized as an internal or external command,
operable program or batch file.
It looks like your PATH environment variable hasn't been set up correctly. Does this link help?
http://community.jboss.org/wiki/FindstrCommandNotFound
EDIT: are you sure that the JBoss startup batch script (usually in %JBOSS_HOME%\bin\run.bat) is picking up the PATH correctly? It might be running as a different user with a different PATH. Edit this script and add the line echo %PATH% before the first line that contains findstr. What output does this give you?
The only other place findstr is used (in jboss-6.0.0.20100721-M4 anyway) is in the service.bat script in the same folder as run.bat . Again, you could try putting echo %PATH% before the line in this script that uses findstr if the previous step didn't help you.
EDIT 2: according to your comments, the echo %PATH% line I asked you to add gave the following output:
E:\jdk1.6\bin;E:\apache-ant-1.7.0\bin;E:\jboss-6.0\bin\run.bat
Clearly this doesn't contain C:\WINDOWS\system32, so JBoss definitely won't be able to find findstr. But I don't understand why the PATH is ending up like this. How are you starting JBoss - as a service or by running run.bat? Is JBoss being run under some user account which has been set up with a very restricted PATH? Do you have some other script which is manipulating the PATH before JBoss starts? Also, which version of Windows are you using?
Also, it's not immediately clear to me from your three comments
I'm already checked that the findstr application is already in that path C:\WINDOWS\system32\
E:\jboss-6.0\bin\run.bat
Am also set that in the system variables in Environmental Variables
whether C:\WINDOWS\system32 is in the PATH in Control Panel > System > Environment Variables. Is C:\WINDOWS\system32 in the PATH in the System Variables section within the Environment Variables dialog?
This doesn't seem to be an issue with JBoss. This seems to be more of an issue with the environment within which you are running it. I can quite imagine a lot of other programs would be unhappy with being run in a similar environment.