LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Classpath problem (https://www.linuxquestions.org/questions/slackware-14/classpath-problem-803609/)

arubin 04-22-2010 04:47 PM

Classpath problem
 
I am running Netbeans installed from slackbuilds.org and the slackware jdk package

This works fine for running programs from the ide and the classes appear to be compiled but if I actually choose Build or Cleand and Build I get this message

Quote:

Created dir: /home/alan/java/Legacy/build/classes
Created dir: /home/alan/java/Legacy/build/empty
Compiling 1 source file to /home/alan/java/Legacy/build/classes
/home/alan/java/Legacy/nbproject/build-impl.xml:363: The following error occurred while executing this line:
/home/alan/java/Legacy/nbproject/build-impl.xml:168: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "/usr/lib64/java"
BUILD FAILED (total time: 0 seconds)
Now /usr/lib64/java does contain a jdk and javac is present in bin/ There is some weird error with netbeans and the classpath and I cannot puzzle it out

Richard Cranium 04-22-2010 06:43 PM

In Netbeans, go to Tools -> Options -> Miscellaneous -> Ant

Ensure that /usr/lib64/java/lib/tools.jar is in the classpath area.

arubin 04-23-2010 02:13 AM

Thanks! Why do they make that so complicated?

molossus 11-14-2010 11:14 PM

Quote:

Originally Posted by Richard Cranium (Post 3944559)
In Netbeans, go to Tools -> Options -> Miscellaneous -> Ant

Ensure that /usr/lib64/java/lib/tools.jar is in the classpath area.

i have one question, why does one has to do this with slackware and not with any other linux distro?
i didnt google enough when i had this problem , i had to kill slack from my laptop.

Richard Cranium 11-15-2010 12:55 AM

Quote:

Originally Posted by molossus (Post 4159019)
i have one question, why does one has to do this with slackware and not with any other linux distro?

Wow. I've never met anyone who has tried every other Linux distribution on the planet, much less run Netbeans under each and every one.

molossus 11-15-2010 11:28 AM

Quote:

Originally Posted by Richard Cranium (Post 4159077)
Wow. I've never met anyone who has tried every other Linux distribution on the planet, much less run Netbeans under each and every one.

i am a Linux distro-hop-aholic , the only ones that i not tried are:
puppy
backtrack

i really like slackware. its not just reliable for software development , too much surprises in the middle of everthing.

Bertical 11-15-2010 03:00 PM

I seem to remember having this problem. I think it was because I had both the JRE and JDK installed and JAVA_HOME was pointing to the JRE and not the JDK.

ukstu 02-21-2011 05:25 AM

Quote:

Originally Posted by Bertical (Post 4159822)
I seem to remember having this problem. I think it was because I had both the JRE and JDK installed and JAVA_HOME was pointing to the JRE and not the JDK.

If it helps anyone else searching for a fix, Bertical's solution worked for me.

I uninstalled the JRE package and boom, everything was good.

Cheers Bertical!

Martinezio 02-21-2011 06:01 AM

Well, JDK should replace JRE during install ;) JDK is simply more complex and rich version of Java, than JRE. JRE is just for running Java apps, and JDK is for running and building. So the installation of both environments within one system isn't necessary.

Maybe the Slack Team should take care of this, if JDK package is installed, JRE should be uninstalled (it can be perform in doins.sh script). But I think, that Developers should know this to perform manually...

Cheers.


All times are GMT -5. The time now is 05:51 AM.