LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-14-2019, 07:11 PM   #1
Geremia
Member
 
Registered: Apr 2011
Distribution: slackware64-current
Posts: 492

Rep: Reputation: 45
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: 2,335

Rep: Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930
https://slackbuilds.org/repository/1...velopment/jdk/
 
Old 05-14-2019, 08:15 PM   #3
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 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: 492

Original Poster
Rep: Reputation: 45
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
Senior Member
 
Registered: Mar 2008
Location: Deutschland
Distribution: Slackware64-current
Posts: 1,019

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
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: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
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: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
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



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 10:08 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
Open Source Consulting | Domain Registration