mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-23 01:29:33 +00:00
bug fix if JAVA_HOME not set
This commit is contained in:
parent
8323fdfa30
commit
23b9136e5e
@ -26,7 +26,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: ContikiMoteTypeDialog.java,v 1.33 2007/09/05 14:00:59 fros4943 Exp $
|
* $Id: ContikiMoteTypeDialog.java,v 1.34 2007/09/18 16:23:38 fros4943 Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package se.sics.cooja.contikimote;
|
package se.sics.cooja.contikimote;
|
||||||
@ -1462,9 +1462,13 @@ public class ContikiMoteTypeDialog extends JDialog {
|
|||||||
link2 = link2.replace("$(ARFILE)", arFile.getPath().replace(File.separatorChar, '/'));
|
link2 = link2.replace("$(ARFILE)", arFile.getPath().replace(File.separatorChar, '/'));
|
||||||
ccFlags = ccFlags.replace("$(DEPFILE)", arFile.getPath().replace(File.separatorChar, '/'));
|
ccFlags = ccFlags.replace("$(DEPFILE)", arFile.getPath().replace(File.separatorChar, '/'));
|
||||||
|
|
||||||
link1 = link1.replace("$(JAVA_HOME)", System.getenv().get("JAVA_HOME"));
|
String javaHome = System.getenv().get("JAVA_HOME");
|
||||||
link2 = link2.replace("$(JAVA_HOME)", System.getenv().get("JAVA_HOME"));
|
if (javaHome == null) {
|
||||||
ccFlags = ccFlags.replace("$(JAVA_HOME)", System.getenv().get("JAVA_HOME"));
|
javaHome = "";
|
||||||
|
}
|
||||||
|
link1 = link1.replace("$(JAVA_HOME)", javaHome);
|
||||||
|
link2 = link2.replace("$(JAVA_HOME)", javaHome);
|
||||||
|
ccFlags = ccFlags.replace("$(JAVA_HOME)", javaHome);
|
||||||
|
|
||||||
for (File sourceFile : sourceFiles) {
|
for (File sourceFile : sourceFiles) {
|
||||||
if (sourceFile.isDirectory()) {
|
if (sourceFile.isDirectory()) {
|
||||||
@ -1570,6 +1574,7 @@ public class ContikiMoteTypeDialog extends JDialog {
|
|||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.fatal("Error while compiling library: " + e);
|
logger.fatal("Error while compiling library: " + e);
|
||||||
|
e.printStackTrace();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user