Does anyone know how to turn off the Auto Update feature of Java 8 when installed as a JDK?
We use puppet to install java 8 JDK on hundreds of TeamCity windows agents. The silent installation works fine but the default is to turn on Java Auto Update. Then sometimes the Java update process hangs waiting on someone to reply to the auto update prompt. How can we turn off auto update for JDK installations.
I've seen that this can be done with a configuration file at installation for JRE installation but I can't find anywhere on how to set that up for JDK installations.
The only thing I can think of is to disable the auto updater that loads on startup. This applies to most versions of Windows:
enter code here
- Start menu
- type in my config and hit the first option
- navigate to the start up programs tab and find something along the lines of "java auto updater" and select it and press the disable button.
Another way of doing it is by using CCleaner: it has a built in option to disable startup programs + it is very useful for cleaning the registry and junk files.
If you want to leave out the updater you can take a different approach: download the server JRE provided by Oracle. Despite its name it contains a JDK. The only downside for you might be that this JDK is only available as x64 because it is Oracles policy to only provide this version on servers.
Here is the content of the .tar.gz, which can be unpacked using 7-zip for example. You can clearly see that there is a javac.exe inside that archive:
Related
I'm using NetBeans to develop a Windows app that needs to send email. It works when run from Netbeans(NB), but not outside. Specifically, running the created .jar fails to connect. I think the is the default NB Java version is jdk1.8.0_131 (presumably because that was the current JDK when I originally installed NB and began my app development), while Windows C:\Program Files\Java shows jdk1.8.0_131 and jre1.8.0_291. To test this, I'd like to run my NB created .jar file using jre1.8.0_131.
The selected answer to execute JAR file using a specific version of the JRE says I have to download and install "download and install older version." I've mad several attempts to do the latter, but have yet to find the exact download among the myriad of items at Oracle's site. I'm running Windows 10 Pro.
Any guidance gratefully accepted.
Due to a change of Oracle's licences, you can't download older versions of Oracle's java without an Oracle account.
That being said, you probably want to take a look at OpenJDK or AdoptOpenJDK for older java versions.
I got NetBeans 12.4 running on JDK 8 update 131 on Windows 10 as follows:
First note that there are issues with the use of Firefox for this process, so use a non-Mozilla browser such as Chrome or Edge.
Update 131 is a very old release, and (I think) is only available from Oracle via their Java downloads. You will need an Oracle Account (rather than a Cloud Account) to download, so create one now if necessary. Otherwise log in to your Oracle Account by clicking the View Accounts button at the top of the page.
Oracle's installer gets upset and confused if you have some higher update of JDK 8 already installed, so the first thing I did was to remove it through Control Panel > Programs > Uninstall a program. Optionally delete any remaining JDK installation files from disk as well, though that is not essential.
Go to Oracle's web page for downloading old updates of JDK 8 and JRE 8: It's a very long web page titled "Java SE 8 Archive Downloads (JDK 8u202 and earlier)".
To save scrolling, search in the browser for the text "131". You should land exactly where you need to be within the page, on a line titled "Java SE Development Kit 8u131". Scroll down just a few lines to the line for your hardware and O/S combination. In my case this was "Windows x64".
Click the link for the download file specified to the right on that line. In my case it was named jdk-8u131-windows-x64.exe. The browser should download the file, although if you haven't yet logged in to your Oracle account you will be prompted to do so. As long as your credentials are valid the download will still work.
Since you are using Windows, in File Explorer locate the downloaded file in your browser's download folder. In my case the size of the downloaded file was 207,649,848 bytes.
Double click the file to execute it, and run the JDK installer. By default the installer will install the JDK to one of the Program Files directories on Windows, but you can specify an alternative directory if you prefer. If all goes well the install of update 131 of JDK 8 should work, and you will see this screen:
Next, in NetBeans 12.4 open Tools > Java Platforms and click the Add Platform... button to add JDK 8 update 131. It should be shown as a new platform, though not the default one:
At this point, if you don't want or need JDK 8 update 131 to be your default platform (meaning it is the platform that NetBeans itself runs on), you are finished. Otherwise, follow the remaining four steps below.
Next, edit netbeans.conf to make JDK 8 update 131 the default platform. Add a line similar to the one below, but specifying your appropriate path:
netbeans_jdkhome="C:/Java/jdk1.8.0_131"
If there are any other lines in the file starting with netbeans_jdkhome comment them out with a leading #.
Save the file and restart NetBeans.
From Help > About you should see that JDK 8 update 131 is now the default platform:
To start with :
Using any of the older releases form archive is a potential security
risk.
The specific root cause of the real problem 'works with IDE not with jar' may not necessarily be with the major/minor version itself
But since the question you have posted is about how to install older version, my answer would be:
You should first confirm the specific version of Java SE you need. If it's an older version, that should probably be Java 6, Java 7 or Java 8. If you have already faced an issue, you logs would generally show errors pertaining to a version. If yes, cross check with this link for details.
Go to this Java Archive link.
Good to Sign-in at this point or create an account
You will find sections for Java SE, Java EE, Java ME and Java FX. The default Java SE is the one you probably need
Click on the link for the specific version e.g. Java SE 8
That page will show you a list of sections ordered in this form
Ordered by latest update release number
Type (JDK, JRE or Server JRE)
Select the latest on the top with section name starting Java SE Development Kit. E.g. for Java SE 8 search for 'Java SE Development Kit 8u'
In this section select the download for the specific OS version. E.g. Windows x64
Find JDK installation path :
On windows, if you have installed too many JRE/JDK installations and you are unware of the location :
Click Windows key + X, then I
Copy paste text : Get-Childitem –Path C:\ -Include javac.exe -Filter javac.exe -File -Recurse -ErrorAction SilentlyContinue
Using judgement or even date, note the directory that contains the version number you have installed
Make changes how your application runs :
Option 1 :
Right click My computer -> Properties -> Advanced System Properties -> Advanced -> Environment Variables
Below variables to be modified similar to :
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_xxx
JDK_HOME=C:\Program Files\Java\jdk1.8.0_xxx
Append a %JAVA_HOME%\bin to the PATH variable as well
Run
Option 2 :
Install older version of the JDK on a separate machine and copy the folder onto your new hosted machine.
If you jar name is ed.jar and Main class is com.ed.Main then use direct call similar to below :
C:\Program Files\Java\jdk1.8.0_131\bin\javaw -cp ed.jar com.ed.Main
OR C:\Program Files\Java\jdk1.8.0_131\bin\javaw -jar ed.jar
You can't if you never installed Java 7 or if you don't have an Oracle account.
Oracle said that here.
So I installed the Java 14 JDK (Oracle) and then the Java 8 JRE (Oracle) and before I installed the Java 8 JRE I set the JAVA_HOME system variable to "C:\Program Files\Java\jdk-14.0.1 and added %JAVA_HOME%\bin to PATH and it worked perfectly, the Java 14 JDK was being used for the command prompt and after I installed the Java 8 JRE now Java 8 is being used for command prompt and when I went to check all the information literally nothing was changed so why isn't Java 14 being used for command prompt and how do I fix it?
How does this work?
There is a java.exe in C:\Windows\System32 or something similar that is commonly on the path that points at your 'current' installation, which is controlled by a registry key (HKLM/Software/JavaSoft/ or something similar). Installing the JRE8 second overwrote the 'current version' choice in that registry key, which is causing the java.exe in the system path to go for that one, and not the java.exe from JDK14.
Do you need a JRE / JREs are obsolete.
The real problem is installing a JRE8. Why did you do that? You probably do not need it. You don't need a JRE to run java stuff if you have a JDK (a JDK has all things that a JRE has), JREs as a concept is dead (starting with java9, there are no JREs anymore; the model has changed; instead of end users downloading JREs from oracle and your app from you, the new model is that end users download the JRE and the app, all from you, using for example jlink to create a custom (smaller) JRE just for your app, and thus end users no longer have this 2-step thing which is confusing, and you get to control which version of the 'JRE' is installed, as you installed it).
How do I fix it?
There might be a control panel widget to change the way the win\sys32 java.exe works. Otherwise, go hunt for that JavaSoft key in the registry, find the subkey in there called 'Current Version', and change it to the same key as what describes the j14 install (probably that key is called '14').
That, or, just uninstall JRE8. You don't need it, it's basically unsupported software at this point; leaving it installed is not great for your system's security.
I'm sure this has a relatively simple answer -_- , but I keep getting a ton of errors and I have no idea why.
Here is the guide I am following:
http://akbarahmed.com/2012/05/12/install-pentaho-bi-server-4-5-on-windows-7-x64/
I am using Java 1.8.0.05, and biserver-ce-5.0.1-stable
When I run start-pentaho.bat, and the Tomcat window opens, I get a whole host of errors.
If I go to localhost:8080/pentaho, I get the following errors:
One or more system listeners failed. These are set in the systemListeners.xml.
org.pentaho.platform.api.engine.PentahoSystemException: PentahoSystem.ERROR_0014 -
Error while trying to execute startup sequence for
org.pentaho.platform.repository2.unified.BackingRepositoryLifecycleManagerSystemListener
I have gone through this entire process 3 times, but nothing seems to work.
There are 3 things you have to take care of:
When running on windows, it is easy to run into Windows' path-length limitation. This then will break the jar-loading which in return gives you random errors as the Tomcat server cannot find the classes contained in these jars. So when you install, do not install it deep into a directory, keep it at the root of your disk. From hard experience, I now always install it in DRIVE:\Pentaho
The Server will not run without the system database. If your logs show you a Quartz-Error, or a Hibernate error, then your HSQL database is not running. In the download, you'll find a "data" directory. Start the "start-hypersonic.bat" before you start the main Pentaho server.
Pentaho does not run with Java 8. There seem to be some incompatible changes in the JDK and I have not been able to actually start it up correctly. You have to use JDK 1.7 to be successful. ALso make sure that your JAVA_HOME or PENTAHO_JAVA_HOME points to the correct JDK.
The Pentaho bat files try to locate a Java installation automatically, and without explicitly setting these environment variables, any JDK may be picked up at random. Usually that is the last JDK that has been installed or updated. So to be safe, lock down the JDK by setting these variables (via Control Panel-> System -> Advanced System Settings -> Environment Variables)
You need to check the catalina.out and pentaho.log files (both should be at biserver-ce/tomcat/logs).
They'll give you more detail on why the server is not starting.
I was having the same error when I installed Java 8 and even after I reinstall Java 7 without removing Java 8 completely.
Remove all Java installations, then you install Java SDK 7
Set the environment variable PENTAHO_JAVA_HOME as your Java 7 path
Then you reboot your computer
Then you start Pentaho BI Server
Hope this help you.
BTW, don't use IE or Safari.
This question was dogging me for a few days until I found almost a full answer but I want to share the issue first:
ISSUE
I have a Windows 7 pro 64 bit laptop that supports both IPv4 and IPv6 (important later)
I downloaded and installed the latest Java 7 u 51 jre / browser plugin and would always get a grey applet box before it would eventually redirect and say "failed to verify" if java was installed.
I am also a java developer and had a few JDKs installed as well as jres. Thinking it was my environment I did a complete wipe of jave from my system (I ran JavaRa and made sure everything was removed http://singularlabs.com/software/javara/)
I installed the 32 bit version of the JRE for the chrome plugin and made sure all the setting and security info was correct (per the many posts about this topic).
After clearing all cache (browser and java), punching holes through my firewall (even disabling it to see if that would resolve it) as well as running things as administrator, verifying java was installed and running in all my browsers (it failed in IE, Chrome and FF)
All of this was per many posts that said how to solve the issue of Java 7 not running in any browser.
After enabling full trace and debugging with the Java console via the Java Control Panel
I finally get some decent clues from the stack traces displayed in the console. It was failing to get resources from java or any site that had an applet or jnlp web start file.
SOLUTION
Finally I ran across this post here (Java 7 on 32-bit Windows 7 - Java Webstart - Unable to load resource)
When adding "-Djava.net.preferIPv4Stack=true" to the runtime parameters under the Java Control Panel (java tab, view) for the current JRE, it solved the problem. I was able to restore my security setting to proper levels and was able to run the java verification tests as well asa bunch of other applets just fine.
When it cam to running jnlp files, I would still get errors unless I manually edit the jnlp file and add it to the vm args i.e.
If you want to apply this change system wide, add the _JAVA_OPTIONS environment variable and add -Djava.net.preferIPv4Stack=true to it
Regards, Shawn Recinto
We are using Windows 8.1 and after updating to the newest java 7u51 we had the same problem and after tech service gave up on our problem, using your help, we found that there was a check box in the Java Control panel that said "Enable Java content in the browser" just needed to be checked. This apparently still needed to be done even though it had already been enabled in the internet settings 'manage add-ons'.
This check box was under the Security Tab in the Java Control Panel.
If you have Chrome and 64-bit Windows here is the answer (originally found here):
"... We all will just have to not use Chrome until they have another release or patch to fix the problem, or roll back Java to pre-7 versions.
"Chrome does not support Java 7. Java 7 runs only on 64-bit browsers and Chrome is a 32-bit browser.
If you download Java 7, you will not be able to run Java content in Chrome and will need to use a 64-bit browser (such as Safari or Firefox) to run Java content within a browser. Additionally, installing Java 7 will disable the ability to use Apple Java 6 on your system..."
Solution
This is a Java.net.SocketException, problem the first answer is correct but here is a very quick way of solving this problem in under a minute.
How to fix
Open command prompt (windows start button, type cmd in search)
Click top left of command prompt, click properties, enable quick edit mode
Copy: setx _JAVA_OPTIONS -Djava.net.preferIPv4Stack=true
Right click on command prompt, should paste
Hit enter. That easy!
After following these steps you applets/java applications should run well and correctly.Refer to this site youtube video for visual presentation.https://www.youtube.com/watch?v=serdRSsl5wE
This is a Java.net.SocketException, problem the first answer is correct but here is a very quick way of solving this problem in under a minute:
Open command prompt (windows start button, type cmd in search)
Click top left of command prompt, click properties, enable quick edit mode
Copy: setx _JAVA_OPTIONS -Djava.net.preferIPv4Stack=true
Right click on command prompt, should paste
Hit enter. That easy!
After following these steps you applets/java applications should run well and correctly.Refer to this site youtube video for visual presentation.
Reference: https://www.youtube.com/watch?v=serdRSsl5wE
Up until recently, I was able to launch/open JNLP files in Firefox using Java web start.
Don't know what happened all of a sudden JNLP files stopped launching, a splash screen appears saying Java Starting... and then nothing happens. Even the Java Console in the browser and javacpl.cpl applet doesn't open.
Tried all possibilities: removed all older version and installed the latest JRE (java version "1.6.0_17"), still it doesn't work.
Done some googling for this problem, people suggested to start javaws.exe with -viewer option but same behavior (a splash screen appears saying "Java Starting..." and then disappears)
The problem is that I don't know any place (logs etc.) to look for to see what is causing the problem.
I am using WinXP SP3, and some of the screenshots below shows further info about my system.
I can provide any other detail if required but please help me solve this problem.
Have a look at what happens if you run javaws.exe directly from the command line.
I know this is an older question but this past week I started to get a similar problem, so I leave here some notes regarding the solution that fits me.
This happened only in some Windows machines using even the last JRE to date (1.8.0_45).
The Java Web Start started to load but nothing happened and none of the previous solution attempts worked.
After some digging i've found this thread, which gives the same setup and a great explanation.
https://community.oracle.com/thread/3676876
So, in conclusion, it was a memory problem in x86 JRE and since our JNLP's max heap was defined as 1024MB, we changed to 780MB as suggested and it was fixed.
However, if you need more than 780MB, can always try launching in a x64 JRE version.
i had the same problem here. go to your Java Control Panel and Settings... Uncheck 'Keep temporary files on my computer'. Apply changes and try again your .jnlp
Note: Tested on different machines; Windows Server 2012, Windows Server 2008 and Windows 7 64bit.
Java Version: 1.7++ since my jnlp app is built on 1.7
Please let me know your feedback too. :D
Java web start should be enabled.
Check if javaws (Java web start is enabled for your system), Use below command in console to open java control panel.
javaws -viewer
If javacpl does not open and gives you Could not find the main class:, it could be that Java is confused because of changes in deployment.properties (can be found in C:\Users\<username>\AppData\LocalLow\Sun\Java\Deployment on Win7). Delete that file and everything's fine.
This bug seems to be 6 years old, cf. An app should be able to ignore properties that have become obsolete over time, shouldn't it?
Although this question is bit old, the issue was caused by corrupted ClearType registry setting and resolved by fixing it, as described in this ClearType, install4j and case of Java bug post.
ClearType, install4j and case of Java bug Java
Do you know what
ClearType (font-smoothing technology in Windows) has in common with
Java (programming language and one of the recommended frameworks)?
Nothing except that they were working together hard at making me
miserable for few months. I had some Java software that I couldn’t
install. I mean really couldn’t – not even figure out reason or
reproduce it on another PC.
Recently I was approved for Woopra beta (site analytics service) and
it uses desktop client written in Java… I couldn’t install. That got
me really mad. :)
Story All of the software in question was similar :
setup based on install4j; setup crashing with bunch of errors. I was
blaming install4j during early (hundred or so) attempts to solve
issue. Later I slowly understood that if it was that bugged for that
long time – solution would have been created and googled.
Tracing After shifting focus from install4j I decided to push Java
framework. I was trying stable versions earlier so decided to go for
non-stable 1.6 Update 10 Release Candidate.
This actually fixed error messages but not crashes. I had also noticed
that there was new error log created in directory with setup files.
Previously I had only seen logs in Windows temporary directory.
New error log was saying following :
Could not display the GUI. This application needs access to an X
Server. If you have access there is probably an X library missing.
******************************************************************* You can also run this application in console mode without access to an
X server by passing the argument -c Very weird to look for X-Server on
non-Linux PC, isn’t it? So I decided to try that “-c” argument. And
was actually able to install in console mode.
Happy ending? Nope. Now installed app was crashing. But it really got
me thinking. If console works but graphical interface doesn’t – there
must be problem with latter.
One more error log (in application folder) was now saying (among other
things) :
Caused by: java.lang.IllegalArgumentException: -60397977 incompatible
with Text-specific LCD contrast key Which successfully googled me
description of bug with Java unable to read non-standard ClearType
registry setting.
Solution I immediately launched ClearType Tuner from Control Panel and
found setting showing gibberish number. After correcting it to proper
one all problems with Java were instantly gone.
cleartypetuner_screenshot Lessons learned Don’t be fast to blame
software problems on single application. Even minor and totally
unrelated settings can launch deadly chain reactions. Links Jave
Runtime Environment http://www.java.com/en/download/index.jsp
ClearType Tuner
http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx
Woopra http://www.woopra.com/
install4j
http://www.ej-technologies.com/products/install4j/overview.html
I was also facing the same problem. To fix this to the following steps.
open Javaws from cmd runnig javaws -viewer command. A new window will open
Select the jnlp file which you want and click the run button.
Close the javaws viewer window.
Same solution worked as suggested by hpereira
The issue was due to JRE version was 32 bit and not 64 Bit
Check with java -version to see if your Java is 64 bit
C:\>java -version
java version "1.8.0_192"
Java(TM) SE Runtime Environment (build 1.8.0_192-b12)
Java HotSpot(TM) **64-Bit Server** VM (build 25.192-b12, mixed mode)
Is this an application to which you have the code? Java 6u14 included a change to the way it handles jar security that for us caused very similar issues. If your jars are signed and work with Java 6u13 or below, you might consider either refactoring your code to work around this update or requiring Java 6u13 or below. Unfortunately I don't recall exactly what we did to resolve the issue - it was panic mode at the time.
Again, if you have the code you have tools to work with. You can put in System.out.println statements in your startup routines - anything console output is displayed in the command window when you run the JNLP from the command line. Otherwise you might consider using a nice logger like log4j to get a better idea of the point of failure.
You may also consider removing the application entirely and downloading it anew. Java Web Start has a Control Panel applet that allows you to see the URL your app is downloading from (could be the wrong one), uninstall the app, set security options, etc.
I had the exact same problem. Turned out that the max-heap-size was set to 1024 and missing the unit. The configuration needed to be max-heap-size=1024m.
So apparently invalid memory configuration in the jnlp file will cause this exact behavior.
In my case, the problem was caused by starting my app from a shortcut on the public desktop (windows 7). As a result, as far as I can tell, the temporary files location was set to c:\users\public\etc. This resulted in the unable to write to cache detail. When I reset to defaults in the temporary files control applet, all worked fine.
In my case, Netbeans automatically creates a .jnlp file that doesn't work and my problem was due to an accidental overwriting of the launch.jnlp file on the server (by the inadequate and incorrect version from Netbeans). This caused a mismatch between the local .jnlp file and the remote .jnlp file, resulting in Java Web Start just quitting after "Verifying application."
So no one else has to waste an hour finding a bug that should be communicated adequately (but isn't) by Java WS.
This can also be due to environment variable CATALINA_HOME in your system. In our organization there were several cases where JNLP applications just refused to start without logging anything and emptying CATALINA_HOME solved the issue.
I had the environment variable set in the command prompt and it didn't appear in GUI. I'm not sure if setx command or register removal commands did the trick. Restart seems to be necessary after removing the variable.
I believe this is a security problem. If I download the jnpl file and execute it after a clean java 8 installation via javaws myfile.jnpl everything is working fine (I get multiple windows where I have to confirm some security problems).
I wanted to share the root cause for my issue. I was using High DPI in Windows and this caused JNLP to not launch. I had to turn off High DPI for this to work. Hope this helps.
Try Java Web Launcher, rather than Java Web Start Launcher. It worked for me.
Right-click on the JNLP file that is not opening and select Open With.
In the ‘How you want to open this File’ window, scroll down and click on Look for another app on this PC option.
When the File Explorer window opens, navigate to the following location:
C:\Program Files (x86)\Java\jre1.8.0_261\bin
or the folder for 64bit version
Select javaws.exe and click the Open button. This will open the JNLP file as intended.
Make sure to check the Always use this app to open .jnlp files.
That's all.