A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Refactoring for Software Design Smells: Managing Technical Debt
this week in the
OO, Patterns, UML and Refactoring
Java in General
How to run a java File using RunTime
Joined: Sep 13, 2004
Apr 17, 2008 01:33:00
file which is running on Websphere Application Studio (WSAD). From the Java file i need to invoke a java file to run as like it runs on command prompt. So what i did is i got the RunTime instance and tried to execute the java file like
Runtime.getRunTime.exec("java -cp classpath JavaFilename);
the system was not showing any result or error. Please help me to get it resolved and run the java file
Ramesh Shanmugam - SCJP 1.5
Joined: Mar 22, 2005
Apr 17, 2008 01:48:00
Try using an absolute path for "java", i.e. something like "/usr/bin/java". You may also have to use absolute file paths in the classpath.
You should also read
; you may have to handle I/O as described in it.
I agree. Here's the link:
subject: How to run a java File using RunTime
running another application from java
Any Solution for this.
executable without any JDK???
Problem running exe file in program files thru java
executing java program
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015