Skip to content
Snippets Groups Projects
Commit fc8f7b71 authored by Mark Winter's avatar Mark Winter
Browse files

Fixed warnings and MATLAB launch issue

parent f5a15a39
Branches
No related tags found
No related merge requests found
...@@ -68,7 +68,7 @@ public class LeverscIJ implements PlugInFilter ...@@ -68,7 +68,7 @@ public class LeverscIJ implements PlugInFilter
public int setup(String arg, ImagePlus imp) public int setup(String arg, ImagePlus imp)
{ {
// TODO - Try default install folders (e.g. LOCALAPPDADAT/leversc) // TODO - Try default install folders (e.g. LOCALAPPDATA/leversc)
leverscExec = null; leverscExec = null;
image = imp; image = imp;
...@@ -132,8 +132,9 @@ public class LeverscIJ implements PlugInFilter ...@@ -132,8 +132,9 @@ public class LeverscIJ implements PlugInFilter
dos.write(_crlf); dos.write(_crlf);
dos.close(); dos.close();
int resp = conn.getResponseCode(); // TODO: We don't curently do anything with this response code, but it's important to retrieve it for proper data transmission
// IJ.log(String.format("Got leversc resp: %d", resp)); int status = conn.getResponseCode();
// IJ.log(String.format("LEVERSC response: %d", status));
conn.disconnect(); conn.disconnect();
} }
......
package net.leverjs; package net.leverjs;
import java.nio.file.Path;
import java.nio.file.Paths; import java.nio.file.Paths;
public class PlatformInfo public class PlatformInfo
......
...@@ -14,13 +14,13 @@ import ij.IJ; ...@@ -14,13 +14,13 @@ import ij.IJ;
public class PluginHelper public class PluginHelper
{ {
public static Path getJarPath(Class inClass) throws URISyntaxException public static Path getJarPath(Class<?> inClass) throws URISyntaxException
{ {
URL jarUrl = inClass.getProtectionDomain().getCodeSource().getLocation(); URL jarUrl = inClass.getProtectionDomain().getCodeSource().getLocation();
return Paths.get(jarUrl.toURI()); return Paths.get(jarUrl.toURI());
} }
public static String getResourceProperty(Class inClass, String resourcePath, String propertyName) public static String getResourceProperty(Class<?> inClass, String resourcePath, String propertyName)
{ {
try try
{ {
......
...@@ -125,7 +125,7 @@ end ...@@ -125,7 +125,7 @@ end
function launch_electron_windows(port,fignum,workdir, leverpath, strDB) function launch_electron_windows(port,fignum,workdir, leverpath, strDB)
elec_cmd = 'leverjs.exe'; elec_cmd = 'leverjs.exe';
if ( ~isempty(leverpath) ) if ( ~isempty(leverpath) )
elec_path = fullfile(leverpath,'node_modules','electron','dist','electron.exe'); elec_path = fullfile(leverpath,'node_modules','.bin','electron.cmd');
elec_cmd = [elec_path ' ' fullfile(leverpath,'elever','main.js')]; elec_cmd = [elec_path ' ' fullfile(leverpath,'elever','main.js')];
else else
[status,~] = system(['where ' elec_cmd]); [status,~] = system(['where ' elec_cmd]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment