LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   javac undefined on dvd install of slackware? (https://www.linuxquestions.org/questions/slackware-14/javac-undefined-on-dvd-install-of-slackware-761929/)

kwikness 10-14-2009 04:39 PM

javac undefined on dvd install of slackware?
 
Hi guys,

I just tried running javac on my new Slack install and was surprised to find that the command was unrecognized. I installed off of the DVD, which I thought included almost everything Slackware has to offer and I'm almost sure I saw JDK being installed. Is it installed and not configured or something?

I read a few posts where people were recommended to use gcj instead of javac, but it seems overcomplicated for my purposes and I'm not interested in using it. I also tried going to http://packages.slackware.it/ to verify that JDK was included in the distro I downloaded, but it looks like their web server is currently down.

I'd rather not install a new JDK if there's one there already. Any input?

brianL 10-14-2009 04:51 PM

The jdk is in /extra on the DVD.

Didier Spaier 10-14-2009 04:59 PM

Of course javac is shipped with the jdk:
Code:

bash-3.1$ which javac
/usr/lib64/java/bin/javac
bash-3.1$

In Slackware-13.0 and Slackware64-13.0, the jdk should be manually installed as all packages in the extra directory of the DVD. To make sure, cd to your DVD root directory and type (as root):
Code:

upgradepkg --install-new extra/jdk-6/*txz

kwikness 10-14-2009 05:33 PM

Quote:

Originally Posted by Didier Spaier (Post 3719454)
Of course javac is shipped with the jdk:
Code:

bash-3.1$ which javac
/usr/lib64/java/bin/javac
bash-3.1$

In Slackware-13.0 and Slackware64-13.0, the jdk should be manually installed as all packages in the extra directory of the DVD. To make sure, cd to your DVD root directory and type (as root):
Code:

upgradepkg --install-new extra/jdk-6/*txz

Did the trick! Thanks!

I still find it kind of weird that the JDK isn't included by default though.. Maybe because of it's size?

rworkman 10-14-2009 10:30 PM

Quote:

Originally Posted by kwikness (Post 3719480)
I still find it kind of weird that the JDK isn't included by default though.. Maybe because of it's size?

Pretty much. It would certainly make things easier for us (the Slackware team) to ship only JDK (and put it in the main package tree, either in L or D series) instead of shipping JRE in the L series and JDK in /extra. There's at least one weird happening with something in kde (I don't recall what) that looks for the java libraries at whatever location they were present during compilation. Of course, jdk is installed on the *build* boxes (because it's actually needed for building several parts of kde), and while that alone is not an issue, when you couple that with the fact that jdk and jre put the java libraries in different places, it creates a problem. Then you go and read the license for the Java software and see that it can't be modified AT ALL if you want to remain in compliance with the license for distribution, and now you have a real problem. I don't remember how Pat eventually worked around that, but it involved something that didn't modify the java package, so everybody should be happy :-)

Anyway, as I said, it would be easier for *us* to just ship JDK and be done with it, but of course, there are always folks out there who want to save disk space or not install stuff they don't need or any of a hundred other reasons to only ship jre in a default install, so that's why we are where we are.

Sorry for the mini-rant. :-)


All times are GMT -5. The time now is 11:58 AM.