远程教学支持系统
 
STUDENT
 
FACULTY
 
SCHOOL
 
SUPPORT
 
PUBLIC
 
SIGNUP
DAILY QUIZ
 
     
  B U L L E T I N    B O A R D

Install SQL Developer in Windows/MacOS and Ubuntu Linux

(Subject: Database/Authored by: Liping Liu on 6/12/2022 4:00:00 AM)/Views: 1966
Blog    News    Post   

Install in Windows 10/11:

  • Oracle SQL Developer Data Modeler
    • download the version for Mac OSX or for Windows 10 with Java JDK at https://www.oracle.com/tools/downloads/sql-data-modeler-downloads.html).
    • After downloading, open the zip file and extract the contained folder into a permanent location like C:\Program Files\oracle\datamodeler
    • Open the extracted folder and right click on datamodeler.exe file and choose "Pin to Start" to create a short cut in Start Menu
    • Again, right click on datamodeler.exe and choose Properties, select Compatibility tab and press "Change Hight DPI Settings". Check the boxes as shown in the following figure:

  • Oracle SQL Developer:
    • download the version for Mac OSX or Windows 64 bit with JDK at https://www.oracle.com/tools/downloads/sqldev-downloads.html
    • After downloading, open the zip file and extract the contained folder into a permanent location, like C:\Program Files\oracle\sqldeveloper
    • Open the extracted folder and right click on datamodeler.exe file and choose "Pin to Start" to create a short cut in Start Menu
    • Again, right click on datamodeler.exe and choose Properties, select Compatibility tab and press "Change Hight DPI Settings". Check the boxes as shown in the following figure:

  • (Optional) Set up JAVA_HOME environment variable for your other programs to use Java: go to Control Panel => System => Advanced System Settings => Environment Variables, add a new or edit existing System Variable, called JAVA_HOME to point to your JDK location such as  C:\Program Files\oracle\sqldeveloper\jdk. Then restart your computer

 

Install in Ubuntu Linux:

 

Prerequisites

  • Oracle JDK 8 or 11
  • Oracle SQL Developer

Downloading Prerequisites

Oracle JDK 8/11

  • Go to download Oracle JDK page
  • I will use Oracle JDK 11 because it has a .deb installation file which can be easily installed using dpkg

Oracle JDK Download Page

  • Download Oracle JDK 11 for Debian package (at the time of this post, the version is 11.0.8), you will be prompted to sign in using oracle account to download

Oracle JDK 11 Download Page

Oracle SQL Developer

Oracle SQL Developer Download Page

Prerequisite Completed

Prerequisite Completed

Installation

Oracle JDK 11

  • Open your terminal, go to directory where your prerequisite files are located (in my case it's in ~/Downloads)

Files

  • Install Oracle JDK 11 by using command sudo dpkg -i [YOUR_ORACLE_JDK_PACKAGE.deb], in my case it's sudo dpkg -i jdk-11.0.8_linux-x64_bin.deb

Install Oracle JDK 11

  • Verify your installation by listing the directory of /usr/lib/jvm

Verify Oracle JDK 11

Oracle SQL Developer 20.2

  • Open your terminal, go to /opt directory. This is where i will store the sqldeveloper application, you can choose other directory, but this my preference (and i read also that /opt is for 3rd party apps that we cannot install via apt package manager)

Go To opt

  • Unzip Oracle SQL Developer with command sudo unzip [YOUR_SQL_DEVELOPER_FILE_WITH_LOCATION].zip, in my case it's sudo unzip ~/Downloads/sqldeveloper-20.2.0.175.1842-no-jre.zip. By default the unzip program will extract the zip file into the current directory, since we are in /opt now, we don't need to specify target directory.

Successfully Unzip

  • Locate your Oracle JDK installation under /usr/lib/jvm, we'll need this location to tell Oracle SQL Developer where our Oracle JDK is located. In my case it's /usr/lib/jvm/jdk-11.0.8
  • Go inside the sqldeveloper directory

Inside sqldeveloper Directory

  • You can see that sqldeveloper.sh has executable permission so that we can run it by doing ./sqldeveloper.sh or sh sqldeveloper.sh in the current directory.
  • Run the sqldeveloper.sh file, you will be prompted to enter the Oracle JDK location, just paste it in and press enter

Fill in JDK Path

  • You will see Oracle SQL Developer starting

Loading Started

  • Installation done! You can use the application by executing the sqldeveloper.sh

At this point, the installation process is done and we can use the application. But it's quite troublesome for us to always open the terminal and execute the script to run the application.

Create a Shortcut

Create a link to our sqldeveloper.sh

  • Open your terminal and type command sudo ln -s [YOUR_SQLDEVELOPER.SH_PATH] /usr/local/bin/sqldeveloper, in my case it's sudo ln -s /opt/sqldeveloper/sqldeveloper.sh /usr/local/bin/sqldeveloper
  • Verify that link has been created.

Link has been created

  • Now we can execute our application with command sqldeveloper from any directory. The reason why we put our link inside /usr/local/bin is so that it's available globally.
  • Go to your $HOME directory and execute the command sqldeveloper. You will get an error like this.

Executing sqldeveloper error

  • The error happened because it's trying to execute a syntax inside sqldeveloper.sh that uses relative path to navigate the directory. To fix this problem, what we need to do is edit the sqldeveloper.sh to execute the sqldeveloper binary
  • Open sqldeveloper.sh with your text editor. In my case, i will use vim. Remember to use sudo because this file belongs to root. Your file content should look like this now.

Old

  • We will tell this script to execute the sqldeveloper binary directly without navigating to other directory by using this command /opt/sqldeveloper/sqldeveloper/bin/sqldeveloper $*, your file should look like this now.

New

  • Save the file and try sqldeveloper command again, you should be able to start Oracle SQL Developer now.

Create a desktop shortcut

  • Desktop shortcuts are stored in /usr/share/applications with .desktop extension. So we will create a new file in that directory with the name sqldeveloper.desktop.

Create Desktop File

  • Inside your file should look like this.
[Desktop Entry]
Name=Oracle SQL Developer
Comment=SQL Developer from Oracle
GenericName=SQL Tool
Exec=/usr/local/bin/sqldeveloper
Icon=/opt/sqldeveloper/icon.png
Type=Application
StartupNotify=true
Categories=Utility;Oracle;Development;SQL;
  • Save your file
  • Verify that your shortcut is available to use by searching in application menu.

Shorcut

And that's it. You have completed the installation and created shortcut for Oracle SQL Developer.


           Register

Blog    News    Post
 
     
 
Blog Posts    News Digest    Contact Us    About Developer    Privacy Policy

©1997-2024 ecourse.org. All rights reserved.