• 0

Temporarily change Java paths?


Question

Context- I am trying to run Eclipse using a different Java install than the rest of my stuff; my work PC was saddled with the 32 bit version of the JRE, and before I ask favors of our overloaded desktop guys (we have a great bunch of guys handling desktop and I don't want to put pressure on that positive relationship), I am hoping to find a workaround on my own. Keep in mind that while my work is technical, it is NOT on Windows machines and I am not a Java guy, so I am not sure about this. I am on a machine without local admin rights (our company has stringent rules because we deal in health insurance and pharmaceuticals) so they lock us down moderately tightly. 

Because of the restrictions, I want to replace the Java path in the %path% environment variables from the Oracle one to a JVM that is a "portable" one. It is 64 bits, which will make Eclipse happy. I'm using a.CMD file to set the path for that session, but I se it and the system-supplied path comes back in its place.

 

This is what I try to change to:

setx  JAVA_HOME "C:\local\Downloads\Portable\PortableApps\CommonFiles\JDK"
setx  JRE_HOME "C:\local\Downloads\Portable\PortableApps\CommonFiles\JAVA64"
setx /U path "C:\local\Downloads\Portable\PortableApps\CommonFiles\JAVA64\bin;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Windows\CCM;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Sennheiser\SoftphoneSDK\;c:\Program Files (x86)\WebEx\Productivity Tools;C:\Users\d1b4211\AppData\Local\Microsoft\WindowsApps;"

But this is what the %path% is afterward:

 

Path=C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Windows\CCM;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Sennheiser\SoftphoneSDK\;c:\Program Files (x86)\WebEx\Productivity Tools;C:\Users\d1b4211\AppData\Local\Microsoft\WindowsApps;

I tried both SET and SETX and neither works. I KNOW I am missing something obvious, but just don't know what.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

I have a couple thoughts you could test out.

 

you could create a batch file to launch Eclipse with the correct version every time:

"path to javaw.exe" -jar "filename.jar"

 

or you could try the portable java launcher from portableapps.com

 

https://portableapps.com/apps/utilities/java_portable

https://portableapps.com/apps/utilities/java_portable_launcher

Link to comment
Share on other sites

  • 0

I had tried that and it didn't work; however, I found that in eclipse.ini I could specify where to look for java, so it's all good after that change late this morning.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.