I am trying to use Oracle SQL Developr.
When I try to open it, it asks for the jdk path. Whereas I have only a JRE installed.
I do not have admin privileges and I can not get it that.
I have tried modifying the sqldeveloper\bin\sqldeveloper.CONF file but it did not help.
Is there any alternative to do that.
I have searched for around 3 hours on Google. Nothing hits up straight.
And if you are planning to call it duplicate. I have gone through the similar questions but dint worked out. And installed as per the answer How to start Oracle SQL Developer 4 using 32 bit JDK on Win 64?. But there also ERROR pops up when I start.
I'm assuming you're using the SQL Developer that comes bundled with the Oracle database. IME, it's not worth struggling with that.
I'd recommend using the standalone version instead - it comes with its own JDK, all you need to do is unzip the archive.
UPDATE
Apparently, there's no standalone version of the current SQL Developer 4 for 32bit Windows. But you can use the 3.2.2 release instead.
Copied from this link just for getting it straight to the pointTRIED AND TESTED SOLUTION-With 100 upvotes
As I have tried it and it really works.Posting the solution here.
JDK is not available as a portable zip unfortunately.
However, you can:
Create working JDK directory (C:\JDK in this case)
Download latest version of JDK from oracle (for example jdk-7u7-windows-i586.exe)
Download and install 7-zip (or download 7-zip portable version if you are not administrator)
With 7-zip extract all the files from jdk-[6-7]u?-windows-i586.exe in directory C:\JDK
In command shell (cmd.exe) do the following:
--> change directory to directory C:\JDK\.rsrc\JAVA_CAB10
--> execute command: extrac32 111
Unpack C:\JDK\.rsrc\JAVA_CAB10\tools.zip with 7-zip
In command shell (cmd.exe) do the following:
--> change directory to C:\JDK\.rsrc\JAVA_CAB10\tools\
--> execute command:
for /r %x in (*.pack) do .\bin\unpack200 -r "%x" "%~dx%~px%~nx.jar"
(this will convert all pack files into jar)
Copy whole directory and all subdir of c:\JDK\.rsrc\JAVA_CAB10\tools where you want your JDK to be and setup manually JAVA_HOME and PATH to point to your JDK dir and its BIN subdir.
Thats all. After this you'll be able at least to use javac.exe
Related
I want to ship my java application (command line tool) along with a small jre. I tried a lot using jrecreate options of ejdk but, I am unable to create jre for windows 10. Please help me in this regard. I referred the following links. It is always creating for linux. How to do it for Windows ?
I used the the following command:
jrecreate.bat --profile compact2 --dest compact2-client --vm all
https://blogs.oracle.com/jtc/introducing-the-ejdk
https://www.oracle.com/technetwork/java/embedded/embedded-se/downloads/index.html
https://docs.oracle.com/javase/8/embedded/develop-apps-platforms/installing.htm
Assumption:
You already know what you are going to package into your JRE.
Like you have a list of dependencies or you have a jar file and you need to extract the dependencies and create a JRE with only those dependencies
If Java version is not of concern then you can stick to Java 9 and follow this post here.
https://medium.com/azulsystems/using-jlink-to-build-java-runtimes-for-non-modular-applications-9568c5e70ef4
I tried this a couple of weeks ago and it worked.
Regarding Win or Linux, it depends upon where you are running the jlink command
I used the following command to get compacted jre with profile compact1 in MAC.
jrecreate.sh -d ./compact1-jre/ -p compact1
I am running saxonhe9.jar from the command line (java -jar saxonhe9.jar -versionmsg) on MacOS El Capitan. No matter what .jar I download, the command returns "Saxon-HE 9.7.0.1J from Saxonica". I am not sure if this is an issue with just the version message or that version 9.7.0.1J is somehow hardwired to run when I call ANY saxon jarfile.
I've tried versions 9.4.0.9J, 9.7.0.15J, PE version 9.7.0.15J (trial version) and others. I have tried to clear my $PATH variables and change the $JAVA_HOME. I have uninstalled related packages (e.g. libxml2, libxslt) with Hombrew and pip (e.g. lxml). I'm all out of ideas. What could the issue be and how I could upgrade saxon?
The $PATH and $JAVA_HOME variables are irrelevant here. The presence of absence of other software products like libxml2 or libxslt isn't going to affect things either.
Your command will run whatever is in the JAR file named saxonhe9.jar in your current working directory. Start by doing "ls -l" to see what is in that directory (if necessary, show us the output).
Note that the Saxonica-issued JAR files would be named "saxon9he.jar" or "saxon9pe.jar". Perhaps "saxonhe9.jar" is a typo, and refers to some older JAR which has been renamed for some reason.
I am using Ubuntu 14.04, but I think this question and its answers could be relevant to a beginner in Jena Fuseki using any operating system (if adapted slightly).
I am trying to install Jena Fuseki, however, the instructions in all the tutorials I have found and on the website are unclear to me. I downloaded this file jena-fuseki-1.1.0-distribution.tar.gz and unzipped it into my home directory.
I then ran the following commands:
cd jena-fuseki-1.1.0
mkdir dataDir
chmod +x fuseki-server s-*
fuseki-server --update --loc=dataDir /myDataSet
However this was the output in my terminal after the last command:
fuseki-server: command not found
I suspect there is something I haven't installed, but require to get this working. i.e.
Do I need Java on my machine?
Do I need Apache?
Do I need Apache Jena?
Or perhaps it is something entirely different that I am missing.
Keep in mind I am a beginner, so skipping over the obvious will not help me.
You need to have JAVA installed to successfully run Fuseki, but by the looks of your error you have it installed already, otherwise you would be getting an error message 'java: not found' (or similar).
Except for java there shouldn't be any other dependencies. I had a similar problem to you which I just solved and apparently it is a Linux problem and not a Fuseki error. This is what I did to get it working:
Download the 'apache-jena-2.12.0.tar.gz' and extract it to your (root)/opt folder (which seem to be the directory which is reserved for all the software and add-on packages that are not a part of the default installation).
The folder I extracted into /opt was called jena-fuseki-1.1.0, if you have a different name you have to change jena-fuseki-1.1.0 in the next two commands to the folder name you have. Run this command: export PATH=$PATH:/opt/jena-fuseki-1.1.0
Then run: export FUSEKI_HOME=/opt/jena-fuseki-1.1.0
If you want a persistent data store you should create a new folder in the 'jena-fuseki-1.1.0' folder in which to store the data. You do this by running mkdir dataDir from within the 'jena-fuseki-1.1.0' folder; (if you) call it 'dataDir' (you should) then run: fuseki-server --update --loc=dataDir /myDataset. You can change the name of 'dataDir' if you like and you can also pick a different name for /myDataset if you like which is the name you use when making calls to your database.
You don't need to download Jena seperately to use Fuseki.
That is all; you can now browse to 'localhost:3030' and start SPARQLing away :)
./fuseki-server --update --loc=dataDir /myDataSet
The current dir . is usually not in the path for security reasons. Try:
./fuseki-server --update --loc=dataDir /myDataSet
Also see Jena Fuseki Server command not found.
I'm trying to install the MS SQL JDBC driver on ubuntu to be used with sqoop for Hadoop. I'm totally new to java and linux, so I'm not sure where to extract everything to.
Just put it in the runtime classpath or add its path to the runtime classpath.
How to do it depends on how you're executing the program. If you're using java command in command console to execute a .class file, then use the -cp argument to specify the paths to classes and/or JAR files which are to be taken in the classpath. The classpath is basically a collection of absolute/relative disk file system paths where Java has to look for JAR files and classes.
Assuming that you've downloaded a .zip, you need to extract it and then look for a .jar file (usually in a /lib folder). For starters, it's the easiest to put the .jar in the current working directory and then execute your program (with the Class.forName("com.mysql.jdbc.Driver"); line) as follows:
java -cp .:mysql.jar com.example.YourClass
The . signifies the current path and the : is the separator (which I believe is correct for Ubuntu, on Windows it's ;).
To install the driver, you can:
Download the driver from Microsoft: https://www.microsoft.com/en-us/download/details.aspx?id=11774
Unzip and untar it (gzip -d sqljdbc_6.0.7507.100_enu.tar.gz and
tar -xf sqljdbc_6.0.7507.100_enu.tar)
Install it by copying the correct version into /usr/share/java (It will need to be world readable.) (sudo cp sqljdbc42.jar /usr/share/java/)
In the tomcat directory (/usr/share/tomcat8/lib but it could be tomcat7 if you are running a different version.) run sudo ln -s ../../java/sqljdbc42.jar sqljdbc42.jar (with the correct version names from below).
If you are using Maven, see Setting up maven dependency for SQL Server
The correct version is as follows: (Under System Requirements)
Sqljdbc.jar requires a JRE of 5 and supports the JDBC 3.0 API
Sqljdbc4.jar requires a JRE of 6 and supports the JDBC 4.0 API
Sqljdbc41.jar requires a JRE of 7 and supports the JDBC 4.1 API
Sqljdbc42.jar requires a JRE of 8 and supports the JDBC 4.2 API
Just put your jdbc jar file into /usr/lib/jvm/java-8-oracle/jre/lib/ext by using this command:
sudo cp ojdbc6.jar /usr/lib/jvm/java-8-oracle/jre/lib/ext
I need an urgent help from you people.I got something very odd while trying to integrate php with java. First, my system specifications:
Windows XP
I have installed
XAMPP server:- xampp-win32-1.6.1-installer
This install PHP, Apache, and MySQL on my system. There versions are as follows
Apache Version :- Apache/2.2.4 (Win32)
PHP version :- 4.3.1
Sun Microsystems JDK version :- jdk1.6.0_16
I am achieving this PHP-JAVA extensoion using php-javabridge. I have downloaded javabridge.jar file from following url.
placed the downloaded javabridge.jar file on this path C:\xampp\php\ext\
Settings done in php.ini file for php-java integration are as follows.
; Directory in which the loadable extensions (modules) reside. extension_dir = "C:\xampp\php\ext\"
I also uncomment the java extension.
extension=php_java.dll
I have added following lines in Module Settings section of PHP.ini file.
;;;;;;;;;;;;;;;;;;; ; Module Settings ; ;;;;;;;;;;;;;;;;;;;
[Java] ;This points to the directory where your Java ;classes will be stored. You can designate multiple ;paths, each path separated by a semicolon. ;It must also include the location of php_java.jar java.class.path = "C:\xampp\php\ext\JavaBridge.jar;C:\xampp\php\extensions\php_java.jar;C:\Program Files\Java\jdk1.6.0_16\jre\lib;C:\Program Files\Java\jdk1.6.0_16;C:\prog"
;java.class.path = "C:\xampp\php\extensions\php_java.jar;C:\prog" ; This points to the bin directory of the JDK. java.home = "C:\Program Files\Java\jdk1.6.0_16\bin"
; This must point to the Java Virtual Machine (jvm.dll) file. java.library = "C:\Program Files\Java\jdk1.6.0_16\jre\bin\server\jvm.dll"
; This must point to the location of php_java.dll. java.library.path = "C:\xampp\php\ext;C:\Program Files\Java\jdk1.6.0_16\jre\lib"
java.java = "C:\Program Files\Java\jdk1.6.0_16\bin\javaw.exe"
When I start the apache server service, the program runs ok. But, if I close the browser and open it again, the program no longer runs and give me a "Fatal error: Unable to create Java Virtual Machine in C:\php\java.php ...". If I restart the apache server service, the program works again, but with the same behavior: if I close the browser window and open it again, it does not work. I checked on internet but dont get any solution but found many people facing same problem. And many of them told its a bug in PHP-JAVA bridge. So is there any solution on this problem. I ran out of options and, if anyone could help, I'll appreciate.
Thank You.
I tried the Php-JavaBridge recently, by downloading the latest version of Apache, Tomcat and using JDK8.0 and I think Php 5.4 and got it to work totally fine.
Perhaps try downloading the latest version of everything, start from scratch and install again, it may be you have some version mismatches.
I was using a Windows 64 bit computer, running Windows7.