Why do I get an error that MATLAB cannot locate the JRE upon startup for a 64 bit Linux machine?
    15 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
    MathWorks Support Team
    
 le 4 Oct 2012
  
    
    
    
    
    Modifié(e) : MathWorks Support Team
    
 le 14 Juin 2023
            When I start MATLAB on my 64 bit Linux machine, I get the following error:
---------------------------------------------------------------------------
Warning: Cannot locate Java Runtime Environment (JRE) . . .
         1. Either a correct JRE was not available for redistribution when
            this release was shipped, in which case you should refer to the
            Release Notes for additional information about how to get it.
         2. Or you have tried to use the MATLAB_JAVA environment variable
            to specify an alternate JRE, but MATLAB cannot find it.  Please
            run 'matlab -n' to determine what value you are using for
            MATLAB_JAVA and fix accordingly.
---------------------------------------------------------------------------
Réponse acceptée
  MathWorks Support Team
    
 le 14 Juin 2023
        
      Modifié(e) : MathWorks Support Team
    
 le 14 Juin 2023
  
      This error indicates that you have installed the 32 bit version of MATLAB on a 64 bit machine. Generally this occurs when installing from downloads as the installer on the DVD will automatically install the correct version based upon the correct architecture for the OS.
To resolve this error you will either need to install the 64 bit version of MATLAB (glnxa64) or run MATLAB with the -glnx86 flag. Running a 32 bit version of MATLAB on a 64 bit machine is not supported. It is recommended to reinstall the correct version for your operating system. This can be done by running the installer from the DVD or by downloading the appropriate architecture files from MathWorks website. If downloading from the website, be sure to download all files (.common and .glnxa64) for each product and move them into the same directory as the installer. For more information on the files, see the related solution below.
If you need to run 32 bit MATLAB on a 64 bit machine, it must be launched with the -glnx86 flag:
matlab -glnx86
This issue can also occur sometimes for 64-bit MATLAB installation as well on Fedora Linux when the MATLAB_JAVA environment variable is not pointing to right location of Java. In this case either point it to the right location like:
$MATLABROOT/sys/java/jre/glnxa64/jre1.5.0/lib
or else remove this environment variable itself.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
				En savoir plus sur Startup and Shutdown dans Help Center et File Exchange
			
	Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!