Linux problem with RMIR
Posted: Wed Aug 05, 2020 8:24 am
I have started to learn more about Linux, and to do so I now have set up a machine with 64-bit Ubuntu 20.04. I am having the following problem with RMIR and should like to fix it. I have found that the three shortcuts created by setup.sh all open the intended applications but that the alternative way of opening RM from RMIR with the menu item File > New > Device Upgrade does not work. The relevant bits of code are:
A search of the web found one issue. Apparently javaw does not exist in Linux and one should use java instead. So before the line if ( !javaExe.exists() ) I have added
This has got rid of the error "Unable to find java executable" that I was getting, but it still does not work. Can any Linux expert help me on this?
Edit: I am using openJDK build 1.8.0_252.
Code: Select all
public static File getJreExecutable()
{
String jreDirectory = System.getProperty( "java.home" );
File javaExe = null;
if ( System.getProperty( "os.name" ).startsWith( "Windows" ) )
{
javaExe = new File( jreDirectory, "bin/javaw.exe" );
}
else
{
javaExe = new File( jreDirectory, "bin/javaw" );
}
if ( !javaExe.exists() )
{
return null;
}
return javaExe;
}
private static void runKM( String filename )
{
File javaExe = getJreExecutable();
if ( javaExe == null )
{
System.err.println( "Unable to find java executable" );
return;
}
try
{
Runtime r = Runtime.getRuntime();
String classPath = System.getProperty( "java.class.path" );
r.exec( new String[] { javaExe.getCanonicalPath(), "-cp", classPath, "com.hifiremote.jp1.RemoteMaster", "-rm", "-home", workDir.getAbsolutePath(), filename } );
}
catch ( IOException e )
{
e.printStackTrace();
}
}A search of the web found one issue. Apparently javaw does not exist in Linux and one should use java instead. So before the line if ( !javaExe.exists() ) I have added
Code: Select all
if ( !javaExe.exists() )
{
javaExe = new File( jreDirectory, "bin/java" );
}Edit: I am using openJDK build 1.8.0_252.