[Solved] How to specify which version of Java to use?

I have OpenJDK 7 as my default, but I also am trying to use Oracle's Java 7 for a specific program. I have installed jdk7-compat as suggested by the arch wiki, but I am unsure how to use it specifically.   
java -version outputs:
OpenJDK Runtime Environment (IcedTea 2.5.0) (Arch Linux build 7.u60_2.5.0-2-x86_64)
OpenJDK 64-Bit Server VM (build 24.60-b09, mixed mode)
so OpenJDK is  still the default, which is good. At the same time, how do I use Oracle's Java for a specific program?
Last edited by TheGuyWithTheFace (2014-07-01 16:50:01)

You have to create a bash script to execute that program, where you define your Java variables. For example, let's supposed your oracle Java is installed at /opt/java_1.6.14/ folder
#!/bin/bash
export JAVA_HOME=/opt/java_1.6.14/
export PATH=/opt/java_1.6.14/bin:$PATH
<your command>
Last edited by mgmartins (2014-07-01 08:29:27)

Similar Messages

  • How to Specify Which Version of Rsync on Server Side

    I have installed rsync 3.0.6 on both client and server side and know how to specify which version to use on the client side but am I right in assuming that if I don't specify some how on the server side it will use the version stored in /usr/bin/rsync? Do I have to move the version stored in /usr/local/bin/rsync to /usr/bin?
    Thanks.

    --rsync-path=PROGRAM specify the rsync to run on remote machine

  • How to specify which version of a function to use

    I tried to do what it said, but that resulted in error
    PowershellPS C:\WINDOWS\system32> Import-dscResource -ModuleName @{ModuleName="xPSDesiredStateConfiguration";ModuleVersion="3.4.0.0"}Import-dscResource : The term 'Import-dscResource' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.At line:1 char:1+ Import-dscResource -ModuleName @{ModuleName="xPSDesiredStateConfigura ...+ ~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Import-dscResource:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException

A: How to specify which version of a function to use

(Btw: The Edge Web browser doesn't show the formatting toolbar in these text editors... I switched to IE to write this)I have this script and the problem is, there's two versions of xPSDesiredStateConfiguration in the wildTextconfiguration HTTPPullServer{ # Modules must exist on target pull server Import-DSCResource -ModuleName xPSDesiredStateConfiguration Node dc { WindowsFeature DSCServiceFeature { Ensure = "Present" Name = "DSC-Service" } WindowsFeature IISConsole { Ensure = "Present" Name = "Web-Mgmt-Console" } xDscWebService PSDSCPullServer { Ensure = "Present" EndpointName = "PSDSCPullServer" Port = 8080 PhysicalPath = "$env:SystemDrive\inetpub\wwwroot\PSDSCPullServer" CertificateThumbPrint = "AllowUnencryptedTraffic" ModulePath = "$env:PROGRAMFILES\WindowsPowerShell\DscService\Modules" ConfigurationPath = "$env:PROGRAMFILES\...

(Btw: The Edge Web browser doesn't show the formatting toolbar in these text editors... I switched to IE to write this)I have this script and the problem is, there's two versions of xPSDesiredStateConfiguration in the wildTextconfiguration HTTPPullServer{ # Modules must exist on target pull server Import-DSCResource -ModuleName xPSDesiredStateConfiguration Node dc { WindowsFeature DSCServiceFeature { Ensure = "Present" Name = "DSC-Service" } WindowsFeature IISConsole { Ensure = "Present" Name = "Web-Mgmt-Console" } xDscWebService PSDSCPullServer { Ensure = "Present" EndpointName = "PSDSCPullServer" Port = 8080 PhysicalPath = "$env:SystemDrive\inetpub\wwwroot\PSDSCPullServer" CertificateThumbPrint = "AllowUnencryptedTraffic" ModulePath = "$env:PROGRAMFILES\WindowsPowerShell\DscService\Modules" ConfigurationPath = "$env:PROGRAMFILES\...

  • How doI find which version of jave I have

    how do I find out which updates of Java SE Runtime Environment 6.0 I have installed and where do I get the latest update for my macbook pro with OS X 10.7?

    How to Check Your Java Version (MAC)

  • How to know which version of SQLite is used by the different AIR-Versions?

    For AIR 1.0 and 2.0 this post: http://forums.adobe.com/message/2577582#2577582 has the infos, but it is not clear where they come from.
    How could one find out about the SQLite-versions in 2.5 and 2.6?
    (not even google or any doc that I read about AIR and SQLite mention this)
    thx in adance for any hint or answer,
    karfau

    Thanks for this info.
    Maybe the current version of things like webkit and sqlite could be attached to some readme-like-file in the releases in the future.
    Since u answered I would like to use the chance to ask another question:
    When reading the SQLite-Docs there are some features, that state:
    "available when compiled with the compiler option SQLITE_XYZ"
    It would be intresting to know with which compiler options (a list is here: http://www.sqlite.org/compile.html )
    the AIR-version has been compiled.(Especially those, that can not be guessed by reading the docs )
    Is there any way to find out?
    karfau

  • How to check which version of Jdk installed on the machine?

    How to check which version of Jdk installed on the machine?
    & Which version of Oracle Insatlled on my machine?

    String version = System.getProperty("java.version"); %

  • How to check which version of hyperic is installed , hyperic 32 bit or 64 bit version on solaris

    how to check which version of hyperic is installed , hyperic 32 bit or 64 bit version on solaris

    If you have only a single home, the quickest/easiest way is probably just to check the properties of %ORACLE_HOME%\odp.net\bin\2.x\oracle.dataacess.dll
    Or are you asking how to check it at runtime?
    If you want to see externally what is actually loaded by an app you can use process explorer
    http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx
    If you want to check it in the app itself:
    http://stackoverflow.com/questions/383686/how-do-you-loop-through-currently-loaded-assemblies
    Hope it helps,
    Greg

  • How to tell: Which version of camera raw do I have?

    How to tell which version of camera raw I have? The only Google search I found answering this question refers to is 2 years old and seems to no longer apply. There is no File, Edit etc. menu on the new version of Camera Raw with (Photoshop/Bridge CS6). I do use Adobe Application Manager to do my updates telling me if a new version exists or not, nevertheless I would like to know.

    The F key works as described for me in CS6-ACR7.4 with ACR as the window with focus.  The same function is available using the double-arrow-window icon at the right of the Preview checkbox near the top right of the preview area. 
    When in full-screen mode there is no title bar, but when I press the F key or click the double-arrow, again, ACR becomes smaller and I can see the title bar that includes the ACR version and camera model.  This is on Windows7-64-bit on a 1600x1050 monitor.  Perhaps you’re ACR’s title bar is off the top of the screen so you can’t see it, or maybe ACR optimizes some things if you have a smallish display—do you?
    A plug-in is a program that interfaces with another program but is not independently runnable application, itself, bit is independently updatable, so in this instance, Photoshop doesn’t need to be downloaded and installed every time Adobe adds support for a few more cameras.

  • How to specify which of 2 wifi cards to use

    Hi All,
    I recently installed Arch Linux on a USB (not live, a persistant installation). I have 2 wifi cards: one that came with the laptop and is used via PCIe, which is an Intel Centrino Wireless-N 2200. It's awful. The other, which is a USB wifi card and which I want to use, is an ASUS USB-N10. I checked linux-wless.passys.nl to see if the N10 was supported, and it said it was, and also said: "Supported by the rtl8192su and r8712u staging drivers in the mainline Linux kernel. Firmware from userspace is required." I can't get wifi working properly in Arch Linux, which makes it impossible to progress because I can't install anything and am stuck in just using terminal. I don't know how to specify which card to use in Arch. Any help would be much appreciated.
    Thank you for your answers in advance!

    After running ip addr, it doesn't display names for the different devices in a way that I can tell which ones they are. The names that it gave me are: "lo", "enp3s0", "wlp4s0", and "wlp0s20u2". I know that 2 of those are virtual ports for wireless devices that aren't being used, but I don't know how to differentiate.
    EDIT: Also, when I try to navigate to etc/netctl/examples/wireless-wpa, it says "Correcting wireless-wpa to ."
    EDIT 2: "lo" seems to be a generic interface, and I've narrowed down the names so now I know that my two wireless cards are 'wlp4s0" and "wlp0s20u2". When I ran iwconfig, I got
    wlp4s0 IEEE 802.11bgn ESSID:off/any
    Mode:Managed Access Point: Not-Associated Tx-Power=15dBm
    Retry long limit:7 RTS thr:off Fragment thr:off
    Encryption key: off
    Power Management: off
    wlp0s20u2 unassociated Nickname:"rtl_wifi"
    Mode:Auto Access Point: Not-Associated Sensitivity: 0/0
    Retry:of RTS thr:off Fragment thr:off
    Encryption key:off
    Power Management:off
    Link Quality:0 Signal level:0 Noise level:0
    Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
    Tx excessive retries:0 Invalid misc:0 Missed beacon:0
    lo no wireless exentions
    enp3s0 no wireless extensions
    I'm assuming that this means that the latter two interfaces are the unused virtual interfaces. Does this tell you anything important?
    Last edited by TheAtomicGoose (2014-04-07 21:05:28)

  • Which version of Java for SAP NetWeaver 7.02 in Windows Server 2008

    Hi ,
         I want to install SAP NetWeaver 7.02 (not SP6) in Windows Server 2008 R2 x64, but I don't know which version of Java I should install first, I have downloaded the following four types of Java:
    j2eesdk-1_4_02_2005Q1
    j2sdk-1_4_2_09_windows_i586
    j2re-1_4_2_19-windows-i586-p
    j2sdk-1_4_2_19-windows-i586-p
        But, I don't know which type I should choose to install first.
        Thanks for help!

    Hi Cathal,
        Thanks for your help!
        But the document of SAP installation says:
    If you start sapinst the first time, you will be logged off your operating system and afterwards prompted for the installation directory of JRE 1.4.latest or 1.5.0_22 (tested).
    Do not use 1.6.x! The installation will start, but not finish.
    JRE 1.4.latest or 1.5.0_22 (tested): it means I should install j2re-1_4_2_19-windows-i586-p, is it right?

  • How to know which version Netweaver is been installed in the system

    How to know which version Netweaver is been installed in the system.
    I wanted to know whether i have installed NW04 SP Stack 13 or higher.
    Suggestions / Hints are wellcome
    -Naren

    hi,
    Pretty simple yar
    In portal goto>sysconfig>support-->u can find the Version in the content area at the bottom.
    There u find the SAP WAS version and EP version.
    in NWDS
    goto help---->About sap NWDS -->then popup will disply you find the version.
    Vesion: 2.0.14 like
    Thanks,
    Lohi.
    Message was edited by:
            Lohitha M

  • How to Get Which Version of ODAC is installed on System

    Hi!
    How to find which version of ODAC is installed on system, as it is having many version like 11.2.0.3.0, 11.2.0.2.1, 11.2.0.1.2
    and so many. Again in than some are for for 32 bit & 64 bit.
    Is there any way to find which version is installed on System Using C# . I tried with registry key
    HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\OracleMTSRecoveryService\Setup\All Versions\1\
    but it is giving @<DB_VERSION>@
    Thank you.
    - Dattatrya Moin

    If you have only a single home, the quickest/easiest way is probably just to check the properties of %ORACLE_HOME%\odp.net\bin\2.x\oracle.dataacess.dll
    Or are you asking how to check it at runtime?
    If you want to see externally what is actually loaded by an app you can use process explorer
    http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx
    If you want to check it in the app itself:
    http://stackoverflow.com/questions/383686/how-do-you-loop-through-currently-loaded-assemblies
    Hope it helps,
    Greg

  • How to find which version of JDK is loadjava using

    Hi All,
    How to find which version of JDK is loadjava using?
    I am using Oracle : 9.0.1.5.1 and I need to use class javax.crypto.Cipher which is shipped with JDK 1.4.2, but loadjava is unable to import javax.crypto.*;
    Any inputs would be greatly appreciated.
    Thanks and regards,
    Abba

    Abba,
    From memory only (since I haven't verified it), "loadjava" is a script, so you can have a look at its contents. I believe it actually uses JDK 1.1.8 (which is part of the Oracle installation). In any case, Oracle 9i is compatible with JDK 1.3 only.
    Oracle 10g is compatible with JDK 1.4.
    Good Luck,
    Avi.

  • How to specify PDF Version while generating reports

    Hi,
    We are using Oracle Reports 10.1.2
    We need PDF Version 1.4. But currently we are getting PDF version 1.3.
    How to specify PDF Version as 1.4 while generating the reports?
    Any help will be appreciated
    Thanks,
    Krrish

    Hello,
    You can open the PDF generated by Reports with a text editor : you'll find something like :
    %PDF-1.4
    1 0 obj
    <<
    /Creator (Oracle10gR2 AS Reports Services)
    /CreationDate (D:20070721145421)
    /ModDate (D:20070721145421)
    /Producer (Oracle PDF driver)
    /Title (pdfversion.pdf)
    /Author (Oracle Reports)
    The parameter ACCESSIBLE is described in the online help :
    http://www.oracle.com/webapps/online-help/reports/10.1.2/topics/htmlhelp_rwbuild_hs/rwrefex/cmdline/common/cla_accessible.htm
    For more details, refer to
    http://download-uk.oracle.com/docs/cd/B14099_17/bi.1012/b14048/pbr_pdf.htm
    Oracle® Application Server Reports Services Publishing Reports to the Web
    10g Release 2 (10.1.2)
    B14048-02
    6 Using PDF in Oracle Reports
    6.1.4 Accessibility
    Regards

  • Specifying JRE version in webpage (not using default set in Plugin)

    Hiya,
    I'm trying to set it up so our app loads a specific version of JRE (1.4.2_12) even though v 1.5 is installed on the machine and set as the default in the plugin.
    Cant change the default from being v1.5 in the plugin as it is needed by other application on the system.
    Does anyone know how I can specify which version of the JRE is used if it's even possible.
    Thanks

    Sun has finally documented Family ClassID with a link at the bottom of the JRE 1.6 release notes.
    See this article:
    http://java.sun.com/javase/6/webnotes/family-clsid.html

  • Maybe you are looking for

    • Dunning letter based on Bill-to-party

      Hi, We have a custom smartform for Dunning letter which is a copy of a standard one.It is being triggered by BTE. We have an incoming structure 'mhnd' which is populated based on sold to party and picks up all the outstanding documents pertaining to

    • Adobe Media Encoder CS4 doesn't encode audio

      I'm having trouble getting the Adobe Media Encoder CS4 to work properly. I have tried multiple files of different lengths but end up with the same output. Nice video encoding, but the audio starts and then cuts out after a couple of seconds. The long

    • DIGITAL EDITIONS FREEZES

      I have installed Adobe Digital Editions 2 on my PC running XP (sp3). When I click on the icon it starts but as soon as I click on a menu or button it freezes and the Microsoft window comes up with >>Adobe Digital Editions 2.0 has encountered a proble

    • Sharepoint 2013 - Remove "Recent" from left menu

      Hello All - My client has requested that she be able to remove (or hide) the "Recent" menu header from the left menu in Sharepoint 2013. This is for specified site collections/sites/pages, not farm-wide. So far, I've tried to do this via JQuery by ad

    • Macbook doesn't read blank cd's

      why would blank CD's not be recognized while anything with info on them are? either CD's or DVD's.....? The blank disks just don't show up on the desktop. what gives with the apple drives?