I was trying to use Xuggler ( http://www.xuggle.com/ ) with play! framework. I'm using Mac OSX and also created the ~/.MacOSX/environment.plist file with xuggler path. I also set these in my ~/.bashrc
export XUGGLE_HOME=/usr/local/xuggler
export LD_LIBRARY_PATH=$XUGGLE_HOME/lib
I put all the jars in the /lib folder of my play! application and updated the dependencies.yml like the following -
require:
- play
- provided -> xuggle-xuggler
repositories:
- provided:
type: local
artifact: "${application.path}/lib/xuggle-xuggler.jar"
contains:
- provided -> *
BTW, I also ran play dependencies and it is still giving this error -
UnsatisfiedLinkError occured : no xuggle-xuggler in java.library.path
How can I fix this?
This error points to a problem with linking to a DLL file, so I checked the Xuggler docs for installation, and it had a section specifically to deal with this type of error.
http://wiki.xuggle.com/Frequently_Asked_Questions#Installation_Questions
It has the following, as a set of instructions you should follow to solve the error.
What's up with java.lang.UnsatisfiedLinkError?
It means that Java can't find the Xuggler native library. Check the
following:
Did you install the Xuggler?
Is the environment variable XUGGLE_HOME defined and
pointing to your Xuggler install directory (usually C:\Program
Files\Xuggle on Windows or /usr/local on Linux/Mac)?
If you installed
on Windows, did you reboot after you installed?
Does your PATH
environment variable include %XUGGLE_HOME%\bin on Windows or
$XUGGLE_HOME/bin on Linux/Mac?
Does your PATH environment variable
include %XUGGLE_HOME%\lib on Windows?
Does your LD_LIBRARY_PATH
environment variable include $XUGGLE_HOME/lib on Linux?
Does your
DYLD_LIBRARY_PATH environmentvariable include $XUGGLE_HOME/lib on Mac
OS-X?
Are you using a 32-bit Java JVM, but a 64-bit version of
Xuggler? Or a 64-bit version of the Java JVM but a 32-bit version of
Xuggler? Unfortunately that won't work. You need to make sure that you
match the "bitness" of each release. Sorry.
Related
I'm trying to build a maven project but keep getting error:
Fatal error compiling: invalid target release 16
If I look at my java version
java -version
I can see it is the wrong one:
openjdk version "11.0.11"
even though my path env var is set correctly to c:\Program Files\Java\jdk1.8.0_291\bin
If I do
mvn -version
then it returns the correct one:
Java version: 1.8.0_291
I have opened a new command shell. Same result.
I have rebooted the machine, same result. I have deleted recursively the folders that contained those wrong versions. Same result.
Now I do "where java" and it shows 3 locations remain. 2 are correct but the 3rd shows the culprit:
c:\program files\jetbrains\intellij idea community edition 2021.1.2\jbr\bin.
java -version in there shows "openjdk version "11.0.11 2021-04-20"
why is intellij java overriding my java?
Any ideas?
Depends on your system and your configuration.
Maven and other tools don't care about your PATH. They use the system java registry service to figure out which java they prefer. What does this service look like? Depends on your OS. On windows its registry keys. On mac it's /usr/bin/java which is a softlink that redirects to other stuff. Even if they don't, they'll look at JAVA_HOME (the environment variable) and use that. They don't use the PATH.
Just because some java dir is on your path doesn't mean anything if a java executable is in some earlier PATH. Note on e.g. mac and many linux distros, /usr/bin/java is a thing, and /usr/bin is usually at the start of your PATH variable. This is a java that redirects to the real java. On ubuntu you'd configure this with java-alternatives, etcetera.
If running in an IDE, the IDE doesn't care about any of this and has its own configuration.
The exact explanation of what to do depends on a combinatorial explosion of your JDK installation(s), your OS (and not just 'linux', the specific distro), and the tool you use, that listing it all is a fool's errand.
Make sure the module and project JDK is set to 16 JDK:
Error in android while trying to start Virtual Device Manager:
Cannot launch AVD manager.
Output:
"C:\PROGRA~2\Android\ANDROI~2\sdk\tools\lib\\find_java.exe" -s' is not recognized as an internal or external command,
operable program or batch file.
ERROR: No suitable Java found. In order to properly use the Android Developer
Tools, you need a suitable version of Java JDK installed on your system.
We recommend that you install the JDK version of JavaSE, available here:
http://www.oracle.com/technetwork/java/javase/downloads
If you already have Java installed, you can define the JAVA_HOME environment
variable in Control Panel / System / Avanced System Settings to point to the
JDK folder.
You can find the complete Android SDK requirements here:
http://developer.android.com/sdk/requirements.html
I have reinstalled java jdk several times, i have also set the JAVA_HOME variable correctly.
This problem also persisted in eclipse so i installed android studio.
Exact value of JAVA_HOME : "C:\Program Files\Java\jdk1.8.0_05\".
If any further detail is needed i 'll provide it in comments.
AFAIK, AndroidStudio generally looks out for JRE stuff and Eclipse looks out for JDK stuff. This is what I've done to make both Eclipse and AS work in my system:
Set 2 Environment Variables like below and see if it works..It worked for me without issues
JAVA_HOME - C:\Program Files\Java
JDK_HOME - C:\Program Files\Java\jre7
Hope this helps...
I am trying to run the typesafe activator on Windows7 (32bit).I have JDK 1.8 installed. It keeps saying I don't have a valid JDK installation:
A Java JDK is not installed or can't be found.
Please go to
http://www.oracle.com/technetwork/java/javase/downloads/index.html
and download a valid Java JDK and install before running Activator.
If you think this message is in error, please check
your environment variables to see if "java.exe" and "javac.exe" are
available via JAVA_HOME or PATH.
I had a similar problem on Windows 7 64b. The problem solved by changing the installed directory from "C:\Program Program..." to a directory without space like "c:\java".
So the solution is: Installing Java to a path without spaces.
I hope it can help.
Put the Activator Directory (not the Java Directory) where it's path does not contain spaces! (ie C:\Program Files\ ... is NOT valid)
Also place the Java PATH before all other paths in your Environment Variables.
So I've been getting this error when trying to start Eclipse:
"No java virtual env found after searching the follow locations:
/absolute/path/to/jre6/bin"
I checked the control panel and I got JDK (Update 21 / 64-bit) installed.
However, JDK is installed is installed on my primary drive (the sdd with Windows on) whereas Eclipse is unzipped and executed from my secondary hard drive.
How to I tell eclipse to find Java on my c-drive instead of the d-drive where it's located?
Thanks in advance!
I would suggest you uninstall all versions of Java you have installed and then installed the one you want to use.
Another option is to tell eclipse which Java to use. For example: eclipse -vm c:\path\to\jre\bin\javaw
Locate the eclipse.ini file and ensure that the variable -vm is correct (
FAQ How do I run eclipse):
If a JVM is installed in the eclipse/jre directory, Eclipse will use it; otherwise the launcher will consult the eclipse.ini file and the system path variable. Eclipse DOES NOT consult the JAVA_HOME environment variable.
I am new in learning java programming! I want to make a .jar in a maven project. After running this command mvn clean install, I am getting the following error message:
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile(default-compile) on project wps-demo: Compilation failure
Unable to locate the Javac Compiler in:C:\Program Files\Java\jre7..\lib\tools.jar
Please ensure you are using JDK 1.4 or above and not a JRE(the com.sun.tools.javac.Main class is required)
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable
what can I do for clean this error!
It looks like you have only a JRE (Java Runtime Environment) installed, and not a JDK (Java Development Kit), as this error message says:
Please ensure you are using JDK 1.4 or above and not a JRE(the com.sun.tools.javac.Main class is required)
Download and install the JDK (not JRE) from Oracle's website.
The JRE allows you to run Java programs, but does not include the tools that you need to develop Java software, such as the Java compiler. The JDK does include those tools.
If you already have a JDK installed, then make sure that the JAVA_HOME environment variable refers to the directory where you have the JDK installed, and not to a directory with a JRE.
As your error says you have wrong value in JAVA_HOME variable in system settings... should be something like C:\Program Files\Java\jre6
You can find how to set it HERE for example.
You need to set the environment variable that specifies the location of your java development kit so that windows can find the Java libraries
Put java home path in a JAVA_HOME variable that you can create in the advanced tab of MyComputer properties.
The Java home path would look something like this
C:\Program Files\Java\jdk1.5
Hope this helps
You may also want to have a look at the following article from Maven http://maven.apache.org/guides/mini/guide-building-jdk14-on-jdk15.html
It states that from Maven 2.2.0, Java JDK 1.5 is needed to allow Maven to build the Java project. The article also goes on to show how some of these adjustments can be made so that JDK 1.5 or later can be used in the build process.