LinuxQuestions.org
Visit Jeremy's Blog.
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 05-14-2019, 07:11 PM   #1
Geremia
Member
 
Registered: Apr 2011
Distribution: slackware64-current
Posts: 381

Rep: Reputation: 41
Question javac on slackware-current?


How do I compile Java programs on slackware-current? javac isn't in GCC anymore.
 
Old 05-14-2019, 07:16 PM   #2
USUARIONUEVO
Senior Member
 
Registered: Apr 2015
Posts: 1,133

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
https://slackbuilds.org/repository/1...velopment/jdk/
 
Old 05-14-2019, 08:15 PM   #3
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.2
Posts: 3,265

Rep: Reputation: 1626Reputation: 1626Reputation: 1626Reputation: 1626Reputation: 1626Reputation: 1626Reputation: 1626Reputation: 1626Reputation: 1626Reputation: 1626Reputation: 1626
Quote:
Originally Posted by Geremia View Post
How do I compile Java programs on slackware-current? javac isn't in GCC anymore.
I trot off and get a copy of OpenJDK for the version I need and unpack it in /opt. I use jenv to manage the various versions that I need.

Your use case may be much simpler than mine have been.

(FWIW, I don't claim that /opt is the best place for JDK installations. /usr/local/ is probably better.)
 
1 members found this post helpful.
Old 05-14-2019, 10:56 PM   #4
Geremia
Member
 
Registered: Apr 2011
Distribution: slackware64-current
Posts: 381

Original Poster
Rep: Reputation: 41
Quote:
Originally Posted by Richard Cranium View Post
I trot off and get a copy of OpenJDK for the version I need and unpack it in /opt. I use jenv to manage the various versions that I need.
Ah, that was the issue. I do have
Code:
# grep javac /var/log/packages/openjdk-8u201_b08-x86_64-1alien 
usr/lib64/java/bin/javac
, but, yes, I need some sort of environment variable manager.
 
Old 05-14-2019, 11:09 PM   #5
3rensho
Member
 
Registered: Mar 2008
Location: Switzerland
Distribution: Slackware64
Posts: 226

Rep: Reputation: 15
The 8u212 version is available. I built openjdk using AlienBob's script.

$ javac -version
javac 1.8.0_212

$ which javac
/usr/lib64/java/bin/javac
 
Old 05-15-2019, 04:14 AM   #6
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 7,494

Rep: Reputation: 5822Reputation: 5822Reputation: 5822Reputation: 5822Reputation: 5822Reputation: 5822Reputation: 5822Reputation: 5822Reputation: 5822Reputation: 5822Reputation: 5822
Quote:
Originally Posted by Geremia View Post
Ah, that was the issue. I do have
Code:
# grep javac /var/log/packages/openjdk-8u201_b08-x86_64-1alien 
usr/lib64/java/bin/javac
, but, yes, I need some sort of environment variable manager.
If you installed my package, it installs a file in /etc/profile.d/ which gets executed at login. It sets the $PATH so that the java and javac binaries are found.
I think you either forgot to logout/login or to "source /etc/profile.d/openjdk.sh".
 
1 members found this post helpful.
Old 05-15-2019, 04:17 AM   #7
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 7,494

Rep: Reputation: 5822Reputation: 5822Reputation: 5822Reputation: 5822Reputation: 5822Reputation: 5822Reputation: 5822Reputation: 5822Reputation: 5822Reputation: 5822Reputation: 5822
Quote:
Originally Posted by 3rensho View Post
The 8u212 version is available. I built openjdk using AlienBob's script.

$ javac -version
javac 1.8.0_212

$ which javac
/usr/lib64/java/bin/javac
Essentially the same as my openjdk-8u201_b08 package - the devs forgot to update the version properly. After I built my package from source, they re-released those same sources but with a correct version number (1.8.0_212 instead of 1.8.0_201). I was not bothered to create the packages anew unless someone would complain, and no one did.
 
  


Reply

Tags
gcc, java, javac, slackware-current


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] Script to build always a current ISO image of Slackware (slackware-current) robertjinx Slackware 2 12-09-2010 02:00 AM
javac undefined on dvd install of slackware? kwikness Slackware 4 10-14-2009 10:30 PM
Slackware64 -current vs Slackware -current or Slackware onebuck Slackware 16 06-23-2009 01:19 PM
gcj javac instead of jdk javac rvindiola Linux - Newbie 2 03-29-2006 08:18 PM

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

All times are GMT -5. The time now is 01:19 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration