score:1
it's not eclipse who cannot run the svd
program but the jvm
, because it cannot find svd's
path on the system.
you should put your svd program on $path
variable so that when the jvm runs your program and finds a call to svd, it should know where this svd
program is located so it may call it.
for how to configure your $path variable on osx, check here : setting environment variables in os x?
i also noticed you use runtime
to run external programs in your java program. that is an ancient way to run external programs in java. you should consider using the processbuilder
instead. it's much more flexible, and is considered the best choice to run external programs now:
processbuilder pb = new processbuilder("svd");
process p = pb.start();
//you could also read the error stream, so that when svd is not correctly set on the running system, you may alert the user.
bufferedreader br = new bufferedreader(new inputstreamreader(p.geterrorstream()));
stringbuilder sb = new stringbuilder();
string line;
while ((line = br.readline()) != null) {
sb.append(line);
}
int retcode = p.waitfor();
if(retcode == 2){
//alert the user that svd is not correctly set on path variable.
logger.error(sb);
system.out.println("error!! could not run svd because it's not correctly set on path variable");
}
Source: stackoverflow.com
Related Query
- Environment variables in Eclipse on OSX
- Environment variables in Eclipse
- Eclipse will not open due to environment variables
- Launch mac eclipse with environment variables set
- How to set environment variables to an application on OSX Mountain Lion?
- Setting environment variables in Eclipse to use with Android NDK
- Tell eclipse to reload environment variables
- Setting Environment Variables for All JUnit Tests in Eclipse
- Setting Environment variables for Eclipse IDE launching
- reading environment variables from java using Eclipse
- use environment variables in eclipse
- Eclipse CDT: How to save project-wide environment variables programmatically (permanently)
- Using project_loc and workspace_loc in environment variables in an Eclipse launcher?
- Eclipse does not recognize environment variables
- Setting environment variables in eclipse project
- How do I set environment variables for Rails server in Aptana Studio Eclipse Plugin?
- Setting environment variables in eclipse that references other environment variables
- Can I use Windows Environment Variables into Eclipse Workspace path?
- How to set Environment variables in Run Configuration of an eclipse gradle project?
- Exporting a runnable jar with environment variables specified in Eclipse
- Setting environment variables on eclipse
- start code from eclipse plugin with own environment variables
- Using windows environment variables in eclipse preferences
- Can I reference environment variables in eclipse while defining a (tomcat) server?
- Environment variables tab missing from run configurations in eclipse with cucumber plugin
- Where eclipse stores Environment Variables
- Eclipse Breakpoint and get Environment Variables
- Why are autotyped variables throwing an attribute error? QGIS python plugin using PyDev, Eclipse 4.4, OSX 10.9.3
- Scala: Eclipse access to environment variables in Ubuntu
- Eclipse 3.4 - external JARs with environment variables
More Query from same tag
- Creating dynamic web project with maven in eclipse and deployable with oracle weblogic 12.1.1
- Android SDK Update Issues
- Eclipse error with osgi + maven + maven-pax-plugin
- Syntax highlighting for whole projects is broken
- Autogenerate method response in Eclipse
- "Terminate" in eclipse's console view leaves node.exe running
- Find where all locations where a constant is used in eclipse?
- Unable to locate companion shared library
- Eclipse plugin doesn't work on Macs
- Run opengl and glut on Mac C++ Eclipse
- Eclipse plug-in not working in deployed feature
- how to solve import cannot be resolved error?
- How to share a session in j2ee application?
- Android Support-Library
- How to add Filter to my Combo?
- Eclipse wouldn't build project because of a "build path pr0blem", but the source folder does exist
- Unable to add breakpoint in eclipse
- locate Eclipse's Preferences menu item programmatically in OS X
- How do I load up Google Collections Library in Eclipse?
- Emulator.exe missing from android-sdk\tools
- Java: Type Safety warning with unchecked conversion
- implementing the action bar in the android
- Use of Alternate Entry Points making an Blackberry application can not be uninstalled
- Include files in custom Eclipse with Oomph
- how to stop Eclipse browser from displaying web page upon restarting tomcat?
- Eclipse web service and Android device
- can't build update site using tycho when use root.folder
- What does "Failed to initialize App Engine SDK at [path]" mean, and how to fix it?
- Use hidden API without reflection in Eclipse
- Eclipse RCP application crashes when using scroll in a SWT file browser