I am using ubuntu 16.04, and my java is in /usr/bin/java
and jdk is in /usr/lib/jvm/java-8-openjdk-amd64 . non of these had the javapackager inside.
I am not able to use javapackager command and do not know how to configure it to use in command-line.
Can anyone help me?
Thanks.
It seems javapackager comes with a package called openjfx,
so running apt install openjfx should make the tool available for you, among your other java tools.
$ apt-file search javapackager
openjfx: /usr/lib/jvm/java-8-openjdk-amd64/bin/javapackager
openjfx: /usr/lib/jvm/java-8-openjdk-amd64/man/ja_JP.UTF-8/man1/javapackager.1.gz
openjfx: /usr/lib/jvm/java-8-openjdk-amd64/man/man1/javapackager.1.gz
You should define your java path.
You can set your JAVA_HOME in /etc/profile as Petronilla Escarabajo suggests. But the preferred location for JAVA_HOME or any system variable is /etc/environment.
Open /etc/environment in any text editor like nano or gedit and add the following
JAVA_HOME="/usr/lib/jvm/open-jdk" (java path could be different)
Use source to load the variables, by running this command:
source /etc/environment
Then check the variable, by running this command:
echo $JAVA_HOME
Related
When I run any oci cli command I'm getting below error:
ERROR: Profile '<DEFAULT>' not found in config file C:\Users\user1\.oci\config
Below is my config file for OCI CLI:
[DEFAULT]
user=<admin user ocid>
fingerprint=<fingerprint>
key_file=<path/to/private/key>
tenancy=<tenancy ocid>
region=ap-mumbai-1
I had a similar problem to this. If you use Python and have changed some of the libraries it's possible you may have updated some of the needed dependencies. Upgrade/reinstall oci ie.
pip install oci-cli --upgrade
This sorted the problem for me.
I would suggest you take a backup of this config file, delete it and reconfigure CLI automatically by executing "oci setup config"
I guest that you are using pacman to install oci-cli. You should remove it and reinstall with official method.
https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm
bash -c "$(curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh)"
Please refer this document on Configuring the CLI and tally it with the config file of yours.
And refer the discussion in this forum OCI Config not found issue, this might be useful as well.
I am facing problem setting up java path while installing mysql database in my ubuntu PC. The procedure shows the following and i hav no idea for setting the java path
Error: /usr/lib/jvm/java-1.7.0-openjdk-amd64/bin/java not found or not a valid JDK
Type the full pathname of a JDK installation (or Ctrl-C to quit), the path will be stored in /home/devkrishna/.sqldeveloper/4.1.0/product.conf
/usr/lib/jvm/java-1.8.0-openjdk-amd64
Error: Java home /usr/lib/jvm/java-1.8.0-openjdk-amd64/bin/java is not a JDK.
Running SQL Developer under a JRE is not supported.
If this Java VM is actually a full JDK installation, add
'SetSkipJ2SDKCheck true' to one of the following files.
Otherwise specify a different Java JDK location with a
SetJavaHome directive in one of the following files:
/home/devkrishna/.sqldeveloper/4.1.0/product.conf
/opt/sqldeveloper/sqldeveloper/bin/sqldeveloper.conf
Open terminal (Ctrl+Alt+t)
Type
sudo gedit .bashrc
Enter password of ubuntu user
Go to last line of the file
Type below code in new line
export JAVA_HOME=enter_java_path_here
export PATH=$JAVA_HOME/bin:$PATH
eg: export JAVA_HOME=/home/pranav/jdk1.8.0_131
export PATH=$JAVA_HOME/bin:$PATH
Save the file
Type
source ~/.bashrc
in terminal
Done
The first error looks like you don't have openjdk-7 for some reason it looks like it is also looking for openjdk-8. Install at-least one of them with :
sudo apt-get install openjdk-7-jdk
and/or
sudo apt-get install openjdk-8-jdk
I need to install JDBC for MySQL running in CentOS.
I tried using this command
yum install mysql-connector-java
but it says
No Package mysql-connector-java available
Nothing to do
Do you know any other command that aims to install JDBC?
Here's what I did to solve the issue:
Download the JDBC here
Extract the files anywhere you want. To extract follow the command below
tar -zxvf [TAR FILENAME]
You will find mysql-connector-java-5.1.22-bin.jar inside that folder. Copy that and paste to (in my case) /%android-sdk%/tools/lib
Add the new location of mysql-connector-java-5.1.22-bin.jar to classpath
mysql java connector is platform independent. you can download it from following link
http://dev.mysql.com/downloads/connector/j/
you can put jar file in /lib/ or /webapps//web-inf/libs
I am assuming that you are using tomcat.
Thank you
I installed mysql using apt-get on my local machine recently.
It proceeded with the default my.cnf.
I would like to see what are the compile time configurations of this binary.
Can some one help me how can i do this?
install mysql-server source.
apt-get source mysql-server # root access not needed
This will create some archive files in the current directory. In my debian lenny it creates the following directories. In your Ubuntu it'll be almost same.
mysql-dfsg-5.0-5.0.51a
mysql-dfsg-5.0_5.0.51a-24+lenny5.diff.gz
mysql-dfsg-5.0_5.0.51a-24+lenny5.dsc
mysql-dfsg-5.0_5.0.51a.orig.tar.gz
Now inspect the debian/rules file in extracted source. I did it by this,
less mysql-dfsg-5.0-5.0.51a/debian/rules
You can use other editor (nano, vi, gedit all are okay). Arround line 68 you'll see the configuration option
To know more about how to recompile a debian source package, read
Howto recompile debian packages
Compiling Debian or Ubuntu Source Packages
Try to use this:
shell> mysql_config
grep CONFIG $(which mysqlbug)
Source
I have compiled a program in fedora using the mysql dev library (include mysql.h in header file). I need to compile in on FreeBSD. I do not want to download from source and compile but rather would like to download from ports or something equivalent to facilitate removing it if need be.
Does anyone know the equivalent of the libmysql-dev in FreeBSD. I have not found it in ports?
You do not need a special package for this. The standard mysql client package/port already includes the libraries and the header files you will need. The header files will end up, by
default, in /usr/local/include/mysql/ directory, while
the libraries will go to /usr/local/lib/mysql/.
So - just install a client from ports or packages, and you are set.
mysql.h is included in the mysql-client-xx port.
assuming you have a configure script or makefile you should set the LDFLAGS and CPPFLAGS environment variables to:
export LDFLAGS='-l /usr/local/lib'
export CPPFLAGS='-I /usr/local/include'
(or setenv, if using csh)
then ./configure and make as normal.
if you are compiling from the command line "gcc -o myprog mysource.c" just add the -I and -l options to your command and it should compile fine.
try: find /usr/local -iname 'mysql' to see files (headers, shared objects and binaries) you in fact have installed on your system.