Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                2 decades ago                            
                            
                                4 ott 2010, 11:40 GMT-4                            
                        
                        
                                                    yeps
1 If you are not admin, talk to your admin about that
2 if you are admin or your admin cannot solve the issue, open a ticket with support comsol they are good at solving these issues usually
JF                                                
                                                
                            yeps
1 If you are not admin, talk to your admin about that
2 if you are admin or your admin cannot solve the issue, open a ticket with support comsol they are good at solving these issues usually
JF                        
                                                
                                                                                                            
                                             
                                            
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                1 decade ago                            
                            
                                27 nov 2010, 20:24 GMT-5                            
                        
                        
                                                    Jones,
Thank you for your help.
For others that are running into the same problem:
It turns out that for the mphstart function to work, Comsol must be installed directly to the C drive.  This is the default, but if you change the installation directory from C:\Comsol40a to C:\Program Files\Comsol40a you will run into this cs.root issue.  Just uninstall and reinstall to C:\Comsol40a.                                                
                                                
                            Jones,
Thank you for your help.
For others that are running into the same problem:
It turns out that for the mphstart function to work, Comsol must be installed directly to the C drive.  This is the default, but if you change the installation directory from C:\Comsol40a to C:\Program Files\Comsol40a you will run into this cs.root issue.  Just uninstall and reinstall to C:\Comsol40a.                        
                                                
                                                                                                            
                                             
                                            
                            
                                                                                        
                                Ivar KJELBERG
                                                                                                                                                    COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)
                                                         
                            
                         
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                1 decade ago                            
                            
                                28 nov 2010, 02:46 GMT-5                            
                        
                        
                                                    Hi
the best, is to get hands on the 4.1 and install the new patch they gave out a few days ago, see the main web site
--
Good luck
Ivar                                                
                                                
                            Hi
the best, is to get hands on the 4.1 and install the new patch they gave out a few days ago, see the main web site
--
Good luck
Ivar                        
                                                
                                                                                                            
                                             
                                            
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                1 decade ago                            
                            
                                9 gen 2014, 09:31 GMT-5                            
                        
                        
                                                    Hi everyone,
I was having the same problem with the following output on COMSOL4.3b and COMSOL4.4 
c:\Program Files\COMSOL\COMSOL43b\demo>java -jar start.jar
Exception in thread "main" java.lang.ExceptionInInitializerError
        at com.comsol.model.util.ModelUtil.connect(Unknown Source)
        at StartPoint.main(StartPoint.java:13)
Caused by: java.lang.RuntimeException: Not possible to determine the installation path 'cs.root'.
        at com.comsol.systemutils.SystemUtil.c(Unknown Source)
        at com.comsol.systemutils.SystemUtil.getCsRoot(Unknown Source)
        at com.comsol.systemutils.SystemUtil.<clinit>(Unknown Source)
        ... 2 more
Installing COMSOL to C:\COMSOL solved the problem!
                                                
                                                
                            Hi everyone,
I was having the same problem with the following output on COMSOL4.3b and COMSOL4.4 
c:\Program Files\COMSOL\COMSOL43b\demo>java -jar start.jar
Exception in thread "main" java.lang.ExceptionInInitializerError
        at com.comsol.model.util.ModelUtil.connect(Unknown Source)
        at StartPoint.main(StartPoint.java:13)
Caused by: java.lang.RuntimeException: Not possible to determine the installation path 'cs.root'.
        at com.comsol.systemutils.SystemUtil.c(Unknown Source)
        at com.comsol.systemutils.SystemUtil.getCsRoot(Unknown Source)
        at com.comsol.systemutils.SystemUtil.(Unknown Source)
        ... 2 more
Installing COMSOL to C:\COMSOL solved the problem!
                        
                                                
                                                                                                            
                                             
                                            
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                1 decade ago                            
                            
                                28 mag 2014, 12:36 GMT-4                            
                        
                        
                                                    Update:
Modify your code and use:
import com.comsol.systemutils.SystemUtil;
		System.out.println(SystemUtil.getCsRoot());
		System.setProperty("cs.root", "C:\\COMSOL\\COMSOL43b");
		System.out.println(SystemUtil.getCsRoot());
                                                
                                                
                            Update:
Modify your code and use:
import com.comsol.systemutils.SystemUtil;
		System.out.println(SystemUtil.getCsRoot());
		System.setProperty("cs.root", "C:\\COMSOL\\COMSOL43b");
		System.out.println(SystemUtil.getCsRoot());
                        
                                                
                                                                                                            
                                             
                        
                        
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                9 years ago                            
                            
                                9 dic 2016, 04:44 GMT-5                            
                        
                        
                                                    although this is a pretty old issue, it still exists.
I am using COMSOL 5.2a and stumbled into the issue when building a release version of my java program that uses the COMSOL java interface for fem modeling. In Eclipse everything works fine, but when I packed jar files and wanted to start them including the COMSOL libraries in the classpath I got the same error message.
Thanks to Matthias for his hint to use the system properties to define cs.root.
I have observed that both SystemUtil.getSysProps() and SystemUtil.getCsRoot() throw the exception and unfortunately I was not able to catch the exception, so one have to set cs.root before.
Following workaround worked well for me, I hope it will be stable against version updates. I search the java path for a directory that contains 'Multiphysics' and use that as cs.root:
                Properties props = System.getProperties();
		String path = props.getProperty("java.class.path");
		int pos=path.indexOf("Multiphysics");
		int sem1=path.substring(0, pos).lastIndexOf(";");
		System.setProperty("cs.root", path.substring(sem1+1,pos+12));
		System.out.println("cs.root set to "+SystemUtil.getCsRoot());
But let's be aware that this is only a workaround. I guess that there is some bug in the code that causes the problem to identify the path. My guess: It is either the backslash\ or slash/ in the path or filenames containing spaces (I have windows, so Comsol in installed under 'program files')                                                
                                                
                            although this is a pretty old issue, it still exists.
I am using COMSOL 5.2a and stumbled into the issue when building a release version of my java program that uses the COMSOL java interface for fem modeling. In Eclipse everything works fine, but when I packed jar files and wanted to start them including the COMSOL libraries in the classpath I got the same error message.
Thanks to Matthias for his hint to use the system properties to define cs.root.
I have observed that both SystemUtil.getSysProps() and SystemUtil.getCsRoot() throw the exception and unfortunately I was not able to catch the exception, so one have to set cs.root before.
Following workaround worked well for me, I hope it will be stable against version updates. I search the java path for a directory that contains 'Multiphysics' and use that as cs.root:
                Properties props = System.getProperties();
		String path = props.getProperty("java.class.path");
		int pos=path.indexOf("Multiphysics");
		int sem1=path.substring(0, pos).lastIndexOf(";");
		System.setProperty("cs.root", path.substring(sem1+1,pos+12));
		System.out.println("cs.root set to "+SystemUtil.getCsRoot());
But let's be aware that this is only a workaround. I guess that there is some bug in the code that causes the problem to identify the path. My guess: It is either the backslash\ or slash/ in the path or filenames containing spaces (I have windows, so Comsol in installed under 'program files')