LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-22-2010, 04:47 PM   #1
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 15.0 (multilib)
Posts: 1,350

Rep: Reputation: 75
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
 
Old 04-22-2010, 06:43 PM   #2
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
In Netbeans, go to Tools -> Options -> Miscellaneous -> Ant

Ensure that /usr/lib64/java/lib/tools.jar is in the classpath area.
 
1 members found this post helpful.
Old 04-23-2010, 02:13 AM   #3
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 15.0 (multilib)
Posts: 1,350

Original Poster
Rep: Reputation: 75
Thanks! Why do they make that so complicated?
 
1 members found this post helpful.
Old 11-14-2010, 11:14 PM   #4
molossus
Member
 
Registered: Nov 2010
Location: US
Distribution: Ubuntu 12.04
Posts: 49

Rep: Reputation: 0
Quote:
Originally Posted by Richard Cranium View Post
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.
 
Old 11-15-2010, 12:55 AM   #5
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by molossus View Post
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.
 
Old 11-15-2010, 11:28 AM   #6
molossus
Member
 
Registered: Nov 2010
Location: US
Distribution: Ubuntu 12.04
Posts: 49

Rep: Reputation: 0
Wink

Quote:
Originally Posted by Richard Cranium View Post
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.
 
Old 11-15-2010, 03:00 PM   #7
Bertical
Member
 
Registered: Oct 2008
Location: Kingdom of Mercia
Distribution: Slackware
Posts: 83

Rep: Reputation: 14
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.
 
1 members found this post helpful.
Old 02-21-2011, 05:25 AM   #8
ukstu
LQ Newbie
 
Registered: Nov 2007
Location: UK
Distribution: Slackware
Posts: 6

Rep: Reputation: 0
Quote:
Originally Posted by Bertical View Post
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!
 
Old 02-21-2011, 06:01 AM   #9
Martinezio
Member
 
Registered: May 2009
Location: Warsaw, Poland
Distribution: Slackware64-current
Posts: 191

Rep: Reputation: 32
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.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can't compile, java classpath problem 144419855310001 Linux - Software 2 09-02-2008 05:26 PM
Newbie java classpath problem MarkSlack Linux - Newbie 11 12-19-2007 08:00 AM
JRE -CLASSPATH causing problem tahirghafoor Linux - Software 3 03-28-2006 12:52 AM
Problem with import (CLASSPATH, JAVAPATH?) os2 Programming 2 03-28-2005 08:33 AM
help classpath problem j2sdk1.4.2_04 antony_csf Linux - Software 3 06-17-2004 12:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration