This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 162121 - [Solaris] Project build fails: Error: JAVA_HOME is not defined, cannot find "java" command.
Summary: [Solaris] Project build fails: Error: JAVA_HOME is not defined, cannot find "...
Status: VERIFIED INVALID
Alias: None
Product: javafx
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 6.x
Hardware: Sun All
: P2 blocker (vote)
Assignee: Adam Sotona
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-07 13:38 UTC by Alexandr Scherbatiy
Modified: 2011-10-19 12:06 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Scherbatiy 2009-04-07 13:38:57 UTC
marina-netbeans-plugin: #60

  Product Version         = NetBeans IDE 6.5.1 (Build 200903060201)
  Operating System        = SunOS version 5.11 running on x86
  Java; VM; Vendor        = 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b15; Sun Microsystems Inc.



Steps to reproduce:

- Create a JavaFX Script project
- Build the project

init:
deps-jar:
Error: JAVA_HOME is not defined, cannot find "java" command.
/export/home/duke/NetBeansProjects/temp/02/JavaFXApplication1/nbproject/build-impl.xml:143: exec returned: 1
BUILD FAILED (total time: 0 seconds)
Comment 1 Adam Sotona 2009-04-07 16:23:43 UTC
Please report it to JavaFX Jira on binary launchers - they are responsible to find appropriate Java and this message
comes from packager launcher.
Comment 2 Adam Sotona 2009-04-10 10:54:53 UTC
I've analyzed the JavaFX startup scripts and it should work even in extreme cases.
Please report this issue to Jira with your system configuration (Java installed - where and how, JAVA_HOME set or not,
etc...).
Comment 3 Adam Sotona 2009-04-10 10:56:30 UTC
one more important info - what happen if you type "java" or "javac" into console or "which java" or "which javac".
Comment 4 Alexandr Scherbatiy 2009-04-10 14:03:36 UTC
duke@sol-equilibrium:~$ which java
/usr/bin/java
duke@sol-equilibrium:~$ which javac
which: no javac in (/usr/gnu/bin:/usr/bin:/usr/X11/bin:/usr/sbin:/sbin)
duke@sol-equilibrium:~$ 

duke@sol-equilibrium:~$ java
Usage: java [-options] class [args...]
           (to execute a class)
   or  java [-options] -jar jarfile [args...]
           (to execute a jar file)


duke@sol-equilibrium:~$ javac
bash: javac: command not found

Comment 5 Alexandr Scherbatiy 2009-04-10 14:11:15 UTC
JIRA issue http://javafx-jira.kenai.com/browse/JFXC-3053
Comment 6 Alexandr Scherbatiy 2009-04-16 11:19:40 UTC
It is still reproduced on my system.
Comment 7 Adam Sotona 2009-04-21 09:16:41 UTC
Yes, it is and it will be reproducible until you install some usable JDK on your machine.
With the result given from "which javac" - you did not install any.
Comment 8 Alexandr Scherbatiy 2009-04-21 09:27:02 UTC
I can create a Java project in NetBeans, compile and run it. It means that I have right JDK on my system.

Let see.
- Create a Java project
- Build it
  There is no errors.

- Create a JavaFX project
- Build it
  Error: JAVA_HOME is not defined, cannot find "java" command.

The results for Java and JavaFX projects should be the same.
Comment 9 Adam Sotona 2009-04-21 09:46:07 UTC
You don't have the right JDK:
    which javac
    which: no javac in (/usr/gnu/bin:/usr/bin:/usr/X11/bin:/usr/sbin:/sbin)

You've only unzipped JDK somewhere and pointed NetBeans to that location.

JavaFX SDK is a complex set of tools that must work independently of NetBeans - but I think I've repeated this several
times. Passing JAVA_HOME to one of the tools will not fix the problem.

If you think your custom machine configuration is a general use case that should be covered and handled by all SDK
binary launchers - please fill all details to http://javafx-jira.kenai.com/browse/RT-4139
Comment 10 Alexandr Scherbatiy 2009-05-21 12:20:38 UTC
JIRA issue:
RT-4390 Packager does not properly work if JAVA_HOME is not set
http://javafx-jira.kenai.com/browse/RT-4390
Comment 11 David Strupl 2011-10-19 12:06:06 UTC
Cleaning bugzilla categories ....