1 Reply Latest reply on May 29, 2014 8:52 AM by Dude!

    Best way to define user global settings for SQL Developer 4




      What would be the best way to set a global Java home directory for SQL Developer 4, without modifying any files in the SQL Developer software installation directory? I think modifying any of the installation files is a bad idea because changes will no longer apply when re-installing or upgrading the software, in particular since the software should not be installed into a directory that already contains an installation.


      Under SQL Developer 3 it was possible to create $HOME/.sqldeveloper/jdk, specifying the path to the java home directory. The directory path in that file would be used as the java home directory, regardless of other settings. But that does not seem to work in SQL Developer 4 anymore.


      Also if I would want to set some shell environment variables for SQL Developer only (not .profile) how can I do that without modifying SQL Developer original files?


      What I’m looking for is to set some global preferences, such as:

      setJavaHome or define JAVA_HOME to /opt/JDK - which is a symlic to the current Oracle JDK installtion (under Ubuntu) and unset GNOME_DESKTOP_SESSION_ID


      I know I can patch launcher.sh, but I would prefer to avoid that and instead put some configuration files in $HOME/.sqldeveloper/, which is also used for product.conf, but I do not want to modify product.conf.


      Any suggestions?



        • 1. Re: Best way to define user global settings for SQL Developer 4

          Well, I finally figured the best way is probably to create a simple wrapper script in the users home directory.


          Simply cut and paste the following to the command prompt, for instance:



          cat > $HOME/sqldeveloper.sh << EOF

          export JAVA_HOME=/opt/jdk1.7.0_60





          chmod u+x $HOME/sqldeveloper.sh


          alias sqldeveloper=$HOME/sqldeveloper.sh