Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

OpenJDK not being detected in the browser

 
Ranch Hand
Posts: 125
1
IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure if it belongs here or in the Java Applet section or in some other section. Please accept my apologies if this posting is inappropriate.

I have a laptop with Nvidia GPU, and I want to use the Nvidia scan that automatically detects and downloads my GPU driver. The automated system is available in this link: https://www.nvidia.com/Download/Scan.aspx?lang=en-us

But the automated system shows me the following error. https://imgur.com/HQHNmNQ


Clicking on the Java icon takes me to oracle JDK page(https://www.java.com/en/download/)

But I do not want to install Oracle JDK because I already have OpenJDK installed on my system.

Here is my OpenJDK installation process: I downloaded the zip file for Windows from this link: https://jdk.java.net/14/  And added the bin folder in my system path so java commands can run from anywhere.

What else do I need to do in the OpenJDK installation process for the Nvidia website/Browser to detect it up in the browser?

Note: I know the make and model of my GPU, but I wanted to use the automated system. Essentially I am trying to understand what other things I have missed/skipped in the OpenJDK installation process.

Thanks!
 
Saloon Keeper
Posts: 6522
160
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the browser still support applets? Most browsers don't these days.
 
Sheriff
Posts: 21972
106
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The latest JDK versions, even those from Oracle, come without the applet viewer. It was still mentioned in Java 10, then no longer in Java 11. That's because applets have been insecure since the start. Any web site that still uses them should be avoided, or at least the pages that use them.
 
Master Rancher
Posts: 3876
35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you trying to have a browser execute an applet in an html page using a JDK?  I thought the browser would use a JRE.
 
Saloon Keeper
Posts: 22273
151
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I hope that this process actually wants to run a Java stand-alone application and not an applet.

As was mentioned, applets are seriously deprecated because of security concerns. Of course, if you're running Windows, maybe you don't care - there was never a Linux version of browser-based automated hardware detection because the Unix-related OS's don't like such indulgences.

But if the auto-detection process requires an applet, then it's probably out of date anyway. And even if it's a stand-alone Java Application, there's something odd. You cannot detect hardware on a "write-once/run-anywhere" platform, which means that it would probably have to pull in JNI classes.

All in all, I'd recommend using a manual installation process. Your Windows Control Panel can tell you exactly what model NVidia card you have and you can then download and install it through better-supported channels.
 
Quazi Irfan
Ranch Hand
Posts: 125
1
IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Holloway wrote:I hope But if the auto-detection process requires an applet, then it's probably out of date anyway. And even if it's a stand-alone Java Application, there's something odd.



That is the part I am not sure about. It *appears* to be running and Applet - but how can I be sure?

Are you trying to have a browser execute an applet in an html page using a JDK?  I thought the browser would use a JRE.



I am under the assumption that JRE is a part of JDK. If JDK is installed/in the path - JRE should also be available for all the programs.

The latest JDK versions, even those from Oracle, come without the applet viewer. It was still mentioned in Java 10, then no longer in Java 11.



Hmm interesting. The JDK download link takes me to Java 8.251 download page.
 
Norm Radder
Master Rancher
Posts: 3876
35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you trying to execute an Applet that is referenced in an html page?
What do you mean when you say  Java Applet?

I haven't "installed" a JDK (I just unzip it) and don't know what the JDK install process does for setup to the OS.  The JRE installs I have done make entries in the Windows registry that I assume allow a browser to find the JVM for Applets.  The only browser I know of that supports a Java Applet in Windows is Internet Explorer 11.
 
Quazi Irfan
Ranch Hand
Posts: 125
1
IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Norm Radder wrote:Are you trying to execute an Applet that is referenced in an html page?



I do not know what the Nvidia website is trying to execute. I was assuming that it's a Java Applet. Is there any way for me to check if it's Applet or not?

Norm Radder wrote:The JRE installs I have done make entries in the Windows registry that I assume allow a browser to find the JVM for Applets.



So I have to install a JDK that comes with applet viewer and update Windows registry that allows the browser to find the JVM.
 
Norm Radder
Master Rancher
Posts: 3876
35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

what the Nvidia website is trying to execute.


Can you view the source of the html file sent to your browser?  Does it have any references to applet?

Are you getting any messages? Please copy the full text and paste it here.
 
Tim Holloway
Saloon Keeper
Posts: 22273
151
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can tell if it's attempting to run an applet by using your browser's "View Page Source" feature and looking for the applet/object HTML tag element. It should also tell you what version of JRE the applet requires.

The only other Java download alternatiive is jnlp, which would be a different tag option. But I doubt that that's what's being requested here.

In any event, like I said, I really wouldn't trust Java code to do hardware detection. It's far better to just ask the Windows Hardware application.
 
Quazi Irfan
Ranch Hand
Posts: 125
1
IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Norm Radder wrote:

what the Nvidia website is trying to execute.


Can you view the source of the html file sent to your browser?  Does it have any references to applet?

Are you getting any messages? Please copy the full text and paste it here.



Yes, I can view the source by right-clicking on the page > View Page source but I did not see any applet HTML tag. If it's not trying to run an applet why it would ask for Java? Java Web Start perhaps?

All error messages are included in the screenshot in the first post. It scans for a while. After that, it says "The NVIDIA Smart Scan requires the latest version of Java". Check the first screenshot.
 
Norm Radder
Master Rancher
Posts: 3876
35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It may be easier and quicker to install the JRE, let the page run the code it wants and then uninstall the JRE when done.
 
Marshal
Posts: 3149
466
Android Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Norm Radder wrote:Are you trying to execute an Applet that is referenced in an html page?


This code is from the download page:
 
Tim Holloway
Saloon Keeper
Posts: 22273
151
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That looks a little strange. I THINK that for legacy purposes, it's trying to use an applet. But there's a jnlp element in there.

Download this file: http://www.nvidia.com/services_toolkit/ShimGenLocal/NVJavaDetect/NV_JavaDetect.0.1_32.jnlp

Someone here should be able to tell you how to invoke a jnlp directly without using the web browser. I used to, but I've forgotten.
 
Tim Holloway
Saloon Keeper
Posts: 22273
151
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or, download and run this jar: http://www.nvidia.com/services_toolkit/ShimGenLocal/NVJavaDetect/0.1/NV_JavaDetect.32.jar

its main class is NvJavaDetect.class
 
Quazi Irfan
Ranch Hand
Posts: 125
1
IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Ron McLeod wrote:This code is from the download page:



How did you find it? I checked again, and the text NV_JavaDetect shows up in 2 instances. One in line 281 and another one in 1766.

In 281,

In 1766,


I am unfamiliar with web technologies. Did you look into a linked page?


Tim Holloway wrote:Or, download and run this jar: http://www.nvidia.com/services_toolkit/ShimGenLocal/NVJavaDetect/0.1/NV_JavaDetect.32.jar

its main class is NvJavaDetect.class



When I try to run the jar file I see the following error,

> java -jar NV_JavaDetect.32.jar NvJavaDetect.class
Error: Main method not found in class NvJavaDetect, please define the main method as:
  public static void main(String[] args)
or a JavaFX application class must extend javafx.application.Application


 
Norm Radder
Master Rancher
Posts: 3876
35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The jar file contains class(es) for running an Applet.  It is not a desktop application with a main method etc.
A jar file analyzer program I have says there are references to some netscape.javascript package classes.  Those classes allow an Applet to communicate with javascript code.


#Searching C:\Temp\NVidia_Problem\NV_JavaDetect.32.jar for NvJavaDetect
NvJavaDetect
  netscape/javascript/JSException   >>>> class NOT found! <<<<
  netscape/javascript/JSException
  netscape/javascript/JSObject   >>>> class NOT found! <<<<

#  Found 3 classes.  2 NOT found.


 
Without subsidies, chem-ag food costs four times more than organic. Or this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic