Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 12 of 12

Thread: Java installed but not listed in Windows 10 Apps

  1. #1
    Junior Member
    Join Date
    Aug 2022
    Posts
    22
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Java installed but not listed in Windows 10 Apps

    Dear community,

    Sorry, but I again don’t know what the appropriate forum for my problem is.

    I was following a Maven fundamentals course on Pluralsight, but I got stuck there (it didn’t work). So I switched to https://www.tutorialspoint.com/maven/index.htm.

    I did not exactly follow the setup steps since I had already done that sort of stuff. Then, when I instructed in the command prompt
    mvn --version
    the response was
    Unrecognized option: -
    Error: Could not create the Java Virtual Machine.
    Error: A fatal exception has occurred. Program will exit.

    Java also is unable to run some .java .class and .jar file (which is normal, but before I had managed to make at least one of them work).

    The instruction
    java --version
    returns
    openjdk 18.0.2.1 2022-08-18
    OpenJDK Runtime Environment (build 18.0.2.1+1-1)
    OpenJDK 64-Bit Server VM (build 18.0.2.1+1-1, mixed mode, sharing)


    I looked for a soluiton on https://helpdeskgeek.com/help-desk/h...machine-error/
    None of the suggestions work.

    Uninstalling Java fails because it is not listed in Windows Apps list. Java’s installation folder also doesn’t seem to contain an uninstaller.

    How can I get Maven to work and why isn’t Java listed as an installed program ?

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Java installed but not listed in Windows 10 Apps

    Try asking about Maven on this forum: https://coderanch.com/forums

    Java’s installation folder also doesn’t seem to contain an uninstaller.
    How did you install Java?
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Aug 2022
    Posts
    22
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Java installed but not listed in Windows 10 Apps

    Quote Originally Posted by Norm View Post
    Try asking about Maven on this forum: https://coderanch.com/forums
    OK, thanks. I shall have a look.
    Does the failure to launch a JVM likely due to a problem with Maven rather than with Java ?

    Quote Originally Posted by Norm View Post
    How did you install Java?
    I downloaded the file openjdk-18.0.2.1_windows-x64_bin.zip from somowhere and unzipped it to its final location. (I remember that not having to run an installer confused me.) I suspect that before doing that I uninstalled Java using the Windows App list. There is often something there, as in the HelpDeskGeek article, called Java 8. what is Java 8 ?

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Java installed but not listed in Windows 10 Apps

    I do not know what an "install" on Windows does. If you unzipped/copied a program into some folder, I don't think there was an "install" done and I don't know if Windows would see it and list it.
    If you don't understand my answer, don't ignore it, ask a question.

  5. #5
    Junior Member
    Join Date
    Aug 2022
    Posts
    22
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Java installed but not listed in Windows 10 Apps

    No, extracting in a folder does not cause a program to appear on the Window's application list. I don’t know what an install does either, except add a program to Window’s application list. Apparently HelpDeskGeek assumed that if one has Java, one must have done a Windows install, even though one can use Java without having done a Windows install.

  6. #6
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Java installed but not listed in Windows 10 Apps

    If you don't understand my answer, don't ignore it, ask a question.

  7. #7
    Junior Member
    Join Date
    Sep 2022
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Java installed but not listed in Windows 10 Apps

    Quote Originally Posted by Amoranemix View Post
    mvn --version
    the response was
    Unrecognized option: -
    I reckon that's because mvn wants a single "-" for it's options. Try typing

    mvn -version or mvn -v instead.

    The error says "Unrecognised option: -", which I think indicates that it read the first "-", expected one of it's options next, but instead was given another "-", which is not one of its options.

  8. #8
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Java installed but not listed in Windows 10 Apps

    Do you have maven installed on your machine? What happens when open a command prompt and enter:
    mvn --version

    I get this:
    C:\Users\Norm>mvn --version
    Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
    Maven home: D:\Apache Software Foundation\apache-maven-3.8.1\bin\..
    Java version: 1.8.0_60, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk1.8.0_60\jre
    Default locale: en_US, platform encoding: Cp1252
    OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

    C:\Users\Norm>
    If you don't understand my answer, don't ignore it, ask a question.

  9. #9
    Junior Member
    Join Date
    Aug 2022
    Posts
    22
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Java installed but not listed in Windows 10 Apps

    In System Environment Variables I had created the variable MAVEN_OPTS with value
    -Xms256m – Xmx512m

    Now, what could the Command Prompt mean with “Unrecognized option: -” ?

  10. #10
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Java installed but not listed in Windows 10 Apps

    variable MAVEN_OPTS with value
    -Xms256m Xmx512m

    Now, what could the Command Prompt mean with “Unrecognized option: -” ?
    The isolated - is probably the unrecognized option.
    Remove the space between the - and the X to see if the error goes away.
    If you don't understand my answer, don't ignore it, ask a question.

  11. #11
    Junior Member
    Join Date
    Aug 2022
    Posts
    22
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Java installed but not listed in Windows 10 Apps

    Bingo !

  12. #12
    Junior Member
    Join Date
    Sep 2022
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Java installed but not listed in Windows 10 Apps

    Expert recommended [url=https://www.drjambujain.com/]Dr Jambu Jain[url] as a Top Endocrinologist in Bhopal,Best Diabetes Doctor in Bhopal, Madhya Pradesh. Just because of [url=https://www.drjambujain.com/]Dr Jambu Jain[url] patient reviews, history, ratings, satisfaction, trust, cost and their general excellence.

Similar Threads

  1. Just installed JDK 13 but no Java Control Panel
    By khmer kerry in forum Java IDEs
    Replies: 5
    Last Post: October 22nd, 2019, 06:08 AM
  2. running java program without jdk installed
    By eku in forum What's Wrong With My Code?
    Replies: 4
    Last Post: January 25th, 2014, 08:28 AM
  3. help with java apps.
    By Brt93yoda in forum Java Theory & Questions
    Replies: 5
    Last Post: August 30th, 2010, 11:36 AM
  4. How to get a sum value from items listed in array ?
    By makarov in forum Loops & Control Statements
    Replies: 0
    Last Post: January 6th, 2010, 06:11 PM