Quantcast

[ jEdit-users ] Changing the jre for jedit.exe on Windows

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[ jEdit-users ] Changing the jre for jedit.exe on Windows

Edward Diener-3
How do I change the jre which my installed jedit.exe uses on Windows ?


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
--
-----------------------------------------------
jEdit Users' List
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jedit-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ jEdit-users ] Changing the jre for jedit.exe on Windows

Alan Ezust-3
Administrator
Re-run the Windows installer.


On Sun, Jul 24, 2016 at 6:20 AM, Edward Diener <[hidden email]> wrote:
How do I change the jre which my installed jedit.exe uses on Windows ?


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
--
-----------------------------------------------
jEdit Users' List
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jedit-users


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
--
-----------------------------------------------
jEdit Users' List
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jedit-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ jEdit-users ] Changing the jre for jedit.exe on Windows

Edward Diener-3
On 7/24/2016 11:27 AM, Alan Ezust wrote:
> Re-run the Windows installer.

OK.

But it would certainly be nice if this were not necessary and an ini
file entry could determine the jre being used by jedit.exe. A recent
Java update on Windows removed previous versions of the jre, without
informing the end-user it was going to do so. You can imagine my
surprise when jedit.exe stopped working.

>
>
> On Sun, Jul 24, 2016 at 6:20 AM, Edward Diener <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     How do I change the jre which my installed jedit.exe uses on Windows ?



------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
--
-----------------------------------------------
jEdit Users' List
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jedit-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ jEdit-users ] Changing the jre for jedit.exe on Windows

Edward Diener-3
On 7/25/2016 2:57 AM, Andrew Sowerby wrote:
This is probably something you should take up with the good people of Microsoft ;)
No. What happened is that the Java jre got updated by Oracle but the update removed all previous versions. So while Windows itself has the latest Java installed jedit.exe is still trying to use the latest version that was installed when the jedit installation was invoked. My point was that either jedit.exe should adjust to the latest version installed or that there should be some sort of ini file entry to tell jedit.exe which jre to use.

You should be able to set the JAVA_HOME environment variable, or go to your JRE Control Panel and set the default JRE.
Does setting JAVA_HOME tell jedit.exe which jre to use ?

There is a Java control panel item. I do not see in any of the tabs of this item where I would select a default JRE. There is a tab which shows me the jres installed for the user and the system, but nothing that selects a default JRE.
When the JRE is updated, it should copy the binaries (java.exe, javaw.exe etc.) to the window system directories (system32, SYSWOW), and I'm fairly sure that registry keys get updated too. When you  set the default JRE in the Java Control Panel, this should all be set for  you. Knowing Windows, it'll probably require a restart. 

Other than that, you could try pointing to the new JRE location in the 'jedit.l4j.ini' file.
And what is the jedit.l4j.ini entry which tells jedit.exe which jre to use ?
Look in the %APPDATA%\jedit directory for that (I'd give you the exact name / location, but I don't have my windows machine to hand right now).

On Sun 24 Jul 2016 23:20 Edward Diener <[hidden email]> wrote:
On 7/24/2016 11:27 AM, Alan Ezust wrote:
> Re-run the Windows installer.

OK.

But it would certainly be nice if this were not necessary and an ini
file entry could determine the jre being used by jedit.exe. A recent
Java update on Windows removed previous versions of the jre, without
informing the end-user it was going to do so. You can imagine my
surprise when jedit.exe stopped working.

>
>
> On Sun, Jul 24, 2016 at 6:20 AM, Edward Diener <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     How do I change the jre which my installed jedit.exe uses on Windows ?


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
--
-----------------------------------------------
jEdit Users' List
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jedit-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ jEdit-users ] Changing the jre for jedit.exe on Windows

Dimitri Maziuk
On 7/25/2016 9:11 AM, Edward Diener wrote:
> On 7/25/2016 2:57 AM, Andrew Sowerby wrote:
>> This is probably something you should take up with the good people of
>> Microsoft ;)
> No. What happened is that the Java jre got updated by Oracle but the
> update removed all previous versions. So while Windows itself has the
> latest Java installed jedit.exe is still trying to use the latest
> version that was installed when the jedit installation was invoked.

Happens all the time on linux and /usr/bin/java just keeps magically
pointing to the latest java and everything keeps working. Good people at
Microsoft still haven't figured out how to accomplish that.

Make a bat file that fires up "\latest\java -jar jedit.jar", edit the
bat file whenever you update orrible updater.

Dima


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
--
-----------------------------------------------
jEdit Users' List
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jedit-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ jEdit-users ] Changing the jre for jedit.exe on Windows

maxwell
On 2016-07-25 17:14, Dmitri Maziuk wrote:
> Happens all the time on linux and /usr/bin/java just keeps magically
> pointing to the latest java and everything keeps working. Good people
> at
> Microsoft still haven't figured out how to accomplish that.

It works just fine on Microsoft.  I have jEdit installed on two Windows7
systems, and neither one has ever complained about frequent Java
updates.

    Mike Maxwell


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
--
-----------------------------------------------
jEdit Users' List
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jedit-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ jEdit-users ] Changing the jre for jedit.exe on Windows

Edward Diener-3
In reply to this post by Edward Diener-3
On 7/25/2016 5:45 PM, Andrew Sowerby wrote:

Try this - open command prompt, and type: java -version 

If Windows returns "'java' is not recognized as an internal or external command, operable program or batch file.", then java.exe is not in your PATH.

java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

Now, as I mentioned earlier, IIRC the Java installer should copy the key java binaries (java.exe, javaw.exe and javaws.exe) into your system directories, and since the system directories are already in your PATH (), so then javaw.exe (which jEdit needs to be able to run) will be found in the PATH variable, and this is where jEdit looks by default. jEdit will not scan the entire system to try to figure out where the JRE updater decided to throw your java binaries.   

In my own environments, I usually just set an environment variable JAVA_HOME="[replace with your path where the updated jre bin directory is]", and then I add this to the end of my existing PATH environment variable, so it becomes
PATH="{existing path};$JAVA_HOME/bin"

For specifics on setting JAVA_HOME in Windows, look here : https://docs.oracle.com/cd/E19182-01/820-7851/inst_cli_jdk_javahome_t/

However, the jre installer will do different things depending on what version of JRE it is, and what OS you're installing the JRE on. In earlier versions, it used to update the windows registry to point to the new jre bin directory. That's what you can use the Java control panel to do (or, at least, you used to be able to). However, in the latest versions of Java, I think this has changed. It appears that now it creates three symlinks to java.exe, javaw.exe and javaws.exe in (by default) this directory:


C:\ProgramData\Oracle\Java\javapath


Then, it adds this directory to your PATH, so your PATH may look something like this (I just installed jre 1.8.0_101 on a clean Windows 10 machine to see):

Name: PATH

Value: C:\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\

So, when I subsequently opened a new command prompt window and ran 

java -version

I got this response:

java version "1.8.0_101"

Java(TM) SE Runtime Environment (build 1.8.0_101-b13)

Java HotSpot(TM) Client VM (build 25.101-b13, mixed mode)


All good. At this point, jedit should have no trouble finding the java binaries.

You are wrong !!! Even with all these things happening jedit.exe is looking for java files for the version of Java which was installed when jedit was installed.

EDIT: the JRE installer (versions 1.8.0 and later) create/update this registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\JavaSoft\Java Runtime Environment\1.8.0_101

take a look there, and you'll see the JavaHome key, where the Windows registry points to the JRE home directory.
Perhaps yours was not set, or the binaries got corrupted, or [insert excuse here].

If you get bored trying to fix it, just re-run the installer, as the first responder said, and blame Oracle (sorry Microsoft, you're not to blame for everything, after all).

Good luck.

On Mon 25 Jul 2016 16:11 Edward Diener <[hidden email]> wrote:
On 7/25/2016 2:57 AM, Andrew Sowerby wrote:
This is probably something you should take up with the good people of Microsoft ;)
No. What happened is that the Java jre got updated by Oracle but the update removed all previous versions. So while Windows itself has the latest Java installed jedit.exe is still trying to use the latest version that was installed when the jedit installation was invoked. My point was that either jedit.exe should adjust to the latest version installed or that there should be some sort of ini file entry to tell jedit.exe which jre to use.


You should be able to set the JAVA_HOME environment variable, or go to your JRE Control Panel and set the default JRE.
Does setting JAVA_HOME tell jedit.exe which jre to use ?

There is a Java control panel item. I do not see in any of the tabs of this item where I would select a default JRE. There is a tab which shows me the jres installed for the user and the system, but nothing that selects a default JRE.

When the JRE is updated, it should copy the binaries (java.exe, javaw.exe etc.) to the window system directories (system32, SYSWOW), and I'm fairly sure that registry keys get updated too. When you  set the default JRE in the Java Control Panel, this should all be set for  you. Knowing Windows, it'll probably require a restart. 

Other than that, you could try pointing to the new JRE location in the 'jedit.l4j.ini' file.
And what is the jedit.l4j.ini entry which tells jedit.exe which jre to use ?

Look in the %APPDATA%\jedit directory for that (I'd give you the exact name / location, but I don't have my windows machine to hand right now).

On Sun 24 Jul 2016 23:20 Edward Diener <[hidden email]> wrote:
On 7/24/2016 11:27 AM, Alan Ezust wrote:
> Re-run the Windows installer.

OK.

But it would certainly be nice if this were not necessary and an ini
file entry could determine the jre being used by jedit.exe. A recent
Java update on Windows removed previous versions of the jre, without
informing the end-user it was going to do so. You can imagine my
surprise when jedit.exe stopped working.

>
>
> On Sun, Jul 24, 2016 at 6:20 AM, Edward Diener <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     How do I change the jre which my installed jedit.exe uses on Windows ?

--

_Andrew_



------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
--
-----------------------------------------------
jEdit Users' List
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jedit-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ jEdit-users ] Changing the jre for jedit.exe on Windows

Edward Diener-3
In reply to this post by Dimitri Maziuk
On 7/25/2016 5:14 PM, Dmitri Maziuk wrote:

> On 7/25/2016 9:11 AM, Edward Diener wrote:
>> On 7/25/2016 2:57 AM, Andrew Sowerby wrote:
>>> This is probably something you should take up with the good people of
>>> Microsoft ;)
>> No. What happened is that the Java jre got updated by Oracle but the
>> update removed all previous versions. So while Windows itself has the
>> latest Java installed jedit.exe is still trying to use the latest
>> version that was installed when the jedit installation was invoked.
>
> Happens all the time on linux and /usr/bin/java just keeps magically
> pointing to the latest java and everything keeps working. Good people at
> Microsoft still haven't figured out how to accomplish that.

It is not Microsoft, it is jedit.exe. The program is looking for java
configuration files for the version of java which existed when the
program was installed, even if a later installed version of java on
Windows updates everything else to point to that latest version.

>
> Make a bat file that fires up "\latest\java -jar jedit.jar", edit the
> bat file whenever you update orrible updater.

Sure. But jedit.exe should continue working even after a jav update on
Windows which removes the version that was the current one when jedit
was installed.



------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
--
-----------------------------------------------
jEdit Users' List
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jedit-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ jEdit-users ] Changing the jre for jedit.exe on Windows

Edward Diener-3
In reply to this post by maxwell
On 7/25/2016 5:16 PM, maxwell wrote:
> On 2016-07-25 17:14, Dmitri Maziuk wrote:
>> Happens all the time on linux and /usr/bin/java just keeps magically
>> pointing to the latest java and everything keeps working. Good people
>> at
>> Microsoft still haven't figured out how to accomplish that.
>
> It works just fine on Microsoft.  I have jEdit installed on two Windows7
> systems, and neither one has ever complained about frequent Java
> updates.

Try removing the java version which jedit is using and I will bet that
jedit will indeed complain. That is the version which was current when
jedit.exe was installed.

Previous Java updates on Windows never automatically deleted previous
versions of Java. The latest jre 1.8.0_101 update of Java did delete the
version that jedit.exe is using.



------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
--
-----------------------------------------------
jEdit Users' List
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jedit-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ jEdit-users ] Changing the jre for jedit.exe on Windows

maxwell
On 7/25/2016 7:17 PM, Edward Diener wrote:

> On 7/25/2016 5:16 PM, maxwell wrote:
>> On 2016-07-25 17:14, Dmitri Maziuk wrote:
>>> Happens all the time on linux and /usr/bin/java just keeps magically
>>> pointing to the latest java and everything keeps working. Good people
>>> at
>>> Microsoft still haven't figured out how to accomplish that.
>>
>> It works just fine on Microsoft.  I have jEdit installed on two Windows7
>> systems, and neither one has ever complained about frequent Java
>> updates.
>
> Try removing the java version which jedit is using and I will bet that
> jedit will indeed complain. That is the version which was current when
> jedit.exe was installed.
>
> Previous Java updates on Windows never automatically deleted previous
> versions of Java. The latest jre 1.8.0_101 update of Java did delete the
> version that jedit.exe is using.

Actually, I'm pretty sure earlier versions of Java did uninstall the
preceding version on my home computer (way back when they did not, but I
manually uninstalled them back then).  And at work our IT department
makes sure there's always only one version installed (to do otherwise is
a security issue).  And when I checked jEdit on both computers, it
reported using the most recent version.  So no, jEdit on my computers is
not using the version of Java that was there when jEdit was installed.

When I booted my home PC this evening, Java immediately updated to
version 1.8.0_101.  And I verified that this is the only version
installed on my home computer (nothing else under Program Files\Java,
and no Java at all under Program Files (x86)), no other versions appear
under "Programs and Features" in the Control Panel, and the shortcut
itself confirms that there are no other version in the "Previous
versions" tab.  And jEdit still runs, without my doing anything to it;
it's open on my desktop now (v5.3), and it verifies that it's using Java
1.8.0_101 (Help | About).

If jEdit isn't running on your PC, something is wrong with your PC.

1) What version of Windows are you running?

2) Verify that you don't have any other versions of Java installed (like
I did).

3) Verify that there are no failed instances of jedit running: open the
Task Manager.  Presumably jEdit will not appear in the Applications tab,
or you'd be seeing it.  If it does, conceivably it's running off-screen
somewhere.  You might be able to Alt-Tab to it, then do Alt-Space M, and
try using the cursor keys to move it to where it's visible.  (Try this
first on the visible window of some other running app, so you get the
feel for how it works.  It's harder when you can't see what you're
doing.)  Once you have the jEdit window where you want it, you should be
able to close it, and the next time you launch it, it will show up
there.  (This is for Windows versions up through 7; maybe it's changed
in 8/10, I dunno.)

4) If on the other hand the Task Manager doesn't show any instances of
jEdit on the Applications tab, look in the Processes tab.  Click on the
"Image..." column to order the process alphabetically, and look for the
jedit.exe process and the javaw.exe process.  Kill both (click on them
and hit the "End Process" button, and then try launching jEdit again.
You can see what's happening in the Processes tab.

5) Failing that: What is your jEdit shortcut (I presume that's how
you're trying to start jEdit) set up?  Mine says the "Target" is
"E:\Program Files\jEdit\jedit.exe" (I have my PC set up to boot off the
E drive, and all the executables live there), and "Start in" is set to
"E:\Program Files\jEdit"

6) If you try to run jEdit from the cmd line, what happens?  In other
words, open cmd.exe and type 'jedit' at the command line.  If jedit
itself is not in your path, you might have to type
     "C:\Program Files\jEdit\jedit.exe"
(be sure to put quote marks around it).

7) One other way to launch jEdit would be to type
     java -jar "C:\Program Files\jEdit\jedit.jar"
If only this method works (although I have no idea why this should be),
you can change the shortcut in your menu (or wherever you normally start
jEdit from) to use that invocation, instead of jedit.exe.  That actually
gives you some more options, see
http://jedit.org/users-guide/cli-usage.html.

    Mike Maxwell

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
--
-----------------------------------------------
jEdit Users' List
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jedit-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ jEdit-users ] Changing the jre for jedit.exe on Windows

maxwell
In reply to this post by Edward Diener-3
On 7/25/2016 7:17 PM, Edward Diener wrote:
> Try removing the java version which jedit is using and I will bet that
> jedit will indeed complain. That is the version which was current when
> jedit.exe was installed.
>
> Previous Java updates on Windows never automatically deleted previous
> versions of Java. The latest jre 1.8.0_101 update of Java did delete the
> version that jedit.exe is using.

FYI, I sent a response about this. It appears on the mailing list
archives, but I never got it in my email (and I checked my spam filter).
Bottom line is that jEdit works just fine on my Win7 computers when all
but the most recent version of Java is gone. So whatever problem you're
having, that's not it.

    Mike Maxwell

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
--
-----------------------------------------------
jEdit Users' List
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jedit-users
Loading...