java alternatives - Change auto mode

30

Make the priority of /usr/lib/jvm/java-8-oracle/jre/bin/java higher that the rest to automatically enable it as default java binary.

You can do:

sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-8-oracle/jre/bin/java 1100

Here I have used priority value 1100, actually any value greater that 1074 would do.

Share:
30

Related videos on Youtube

Divs 4799
Author by

Divs 4799

Updated on September 18, 2022

Comments

  • Divs 4799
    Divs 4799 almost 2 years

    I want to create 4 child process using os.fork() method and then inside the parent process I want to list all the child process. And also before terminating each child process I want that each child process must wait for 2 seconds. I was successful in creating 4 child process. but couldn't list the child processes using parent process. This is my code:

    import os
    
    for i in range(4):
      process = os.fork()
    
      if(process > 0):
    

    Please Help in the above

    • pbacterio
      pbacterio almost 3 years
      The code snippet is incomplete
    • MisterMiyagi
      MisterMiyagi almost 3 years
      Do you actually need to use os.fork? Python ships with several higher abstraction layers, most prominently the subprocess module.
    • Divs 4799
      Divs 4799 almost 3 years
      Yes I actually need to use os.fork
    • Divs 4799
      Divs 4799 almost 3 years
      @MisterMiyagi can You do it using sub process ?
    • Community
      Community almost 3 years
      Please provide enough code so others can better understand or reproduce the problem.
  • Divs 4799
    Divs 4799 almost 3 years
    This is a very nice code but this is giving an error that no process is found using the pid 0.