You are not logged in.

#1 2014-08-26 16:26:37

Nelly
Member
From: Bratislava
Registered: 2012-02-15
Posts: 19

Tomcat installation without OpenJDK

Hello archies,

please, can I install Tomcat server (no tomcat-native package) without OpenJDK? I using Oracle's JDK in my /opt directory

sudo pacman -S tomcat8
resolving dependencies...
:: There are 2 providers available for java-runtime>=7:
:: Repository extra
   1) jre7-openjdk  2) jre8-openjdk

Enter a number (default=1):

I cannot choose another than 1 or 2 smile

Some hints? Or just manual installation? Thanks


Linux bella 3.2.5-1-ARCH #1 SMP PREEMPT Tue Feb 7 08:34:36 CET 2012 x86_64 Intel
(R) Core(TM)2 CPU 6600 @ 2.40GHz GenuineIntel GNU/Linux
nVidia GeForce GTS 250

Offline

#2 2014-08-26 16:53:59

Rob_H
Member
Registered: 2012-06-19
Posts: 72

Re: Tomcat installation without OpenJDK

I would probably go with a manual install because Tomcat is pretty self-contained anyway. But you could always install OpenJDK via the dependency and then remove it afterwards with pacman -Rdd. There's probably a way to tell pacman to ignore the dependency during install but I don't know how without googling. :-)

Offline

#3 2014-08-26 18:01:18

Nelly
Member
From: Bratislava
Registered: 2012-02-15
Posts: 19

Re: Tomcat installation without OpenJDK

Thanks for reply smile Yes, I can uninstall it then but I like minimalistics systems with minimum packages and minimum bloat smile That's the reason I using archlinux and not Bloatbuntu smile It's only for internal development Spring JSP, so I can use glassfish server also smile Thanks for the reply


Linux bella 3.2.5-1-ARCH #1 SMP PREEMPT Tue Feb 7 08:34:36 CET 2012 x86_64 Intel
(R) Core(TM)2 CPU 6600 @ 2.40GHz GenuineIntel GNU/Linux
nVidia GeForce GTS 250

Offline

#4 2014-08-26 18:23:47

Rob_H
Member
Registered: 2012-06-19
Posts: 72

Re: Tomcat installation without OpenJDK

If it's for your own development box, I would recommend a manual install anyway so you can easily tweak configuration and start/stop/debug under your normal user account.

Offline

#5 2014-08-26 18:42:24

Wikimig
Developer
From: France
Registered: 2004-12-10
Posts: 77
Website

Re: Tomcat installation without OpenJDK

Tomcat packages require a java-environment. Packages for Oracle JVM do provide it. Just install one of theme. Manually installing a JVM is a bad idea.

Offline

#6 2014-08-26 20:05:41

Nelly
Member
From: Bratislava
Registered: 2012-02-15
Posts: 19

Re: Tomcat installation without OpenJDK

@Wikimig: What do you mean please? What kind "one of theme"? Yes, I had installed Oracle JDK 1.8 in my /opt/jdk folder. But if I want install Tomcat, I must install also one of the openJDK package (1.7 or 1.8). But I have already JDK :-)
@Rob_H: Do you mean manual install of Tomcat?

Thanks


Linux bella 3.2.5-1-ARCH #1 SMP PREEMPT Tue Feb 7 08:34:36 CET 2012 x86_64 Intel
(R) Core(TM)2 CPU 6600 @ 2.40GHz GenuineIntel GNU/Linux
nVidia GeForce GTS 250

Offline

#7 2014-08-26 20:08:17

Nelly
Member
From: Bratislava
Registered: 2012-02-15
Posts: 19

Re: Tomcat installation without OpenJDK

And of course I have set my JAVA properties in .basrc and in .xinitrc also

cat ~/.bashrc

export JAVA_HOME=/opt/jdk1.8.0_11
export PATH=$PATH:/opt/jdk1.8.0_11/bin
export _JAVA_OPTIONS='-Dswing.aatext=true -Dawt.useSystemAAFontSettings=lcd_hbgr'
export JAVA_FONTS=/usr/share/fonts/TTF

Linux bella 3.2.5-1-ARCH #1 SMP PREEMPT Tue Feb 7 08:34:36 CET 2012 x86_64 Intel
(R) Core(TM)2 CPU 6600 @ 2.40GHz GenuineIntel GNU/Linux
nVidia GeForce GTS 250

Offline

#8 2014-08-26 20:25:02

Rob_H
Member
Registered: 2012-06-19
Posts: 72

Re: Tomcat installation without OpenJDK

Yes, a manual install of Tomcat is what I meant.

Offline

#9 2014-08-26 20:38:28

Wikimig
Developer
From: France
Registered: 2004-12-10
Posts: 77
Website

Re: Tomcat installation without OpenJDK

I strongly advise you against manually installing software thare are provided as packages by your distro (either in official repos – tomcat*, OpenJDK – or AUR – Oracle JDK).

To sum up (and if you insist you do not want OpenJDK), if I were you I would:

1) Remove all the JAVA_HOME, and PATH variables you mention from ~/.bashrc and ~/.xinitrc (very important)
2) Install jre8-oracle and jdk8-oracle from AUR or from my repo. As these packages provide "java-environment" now you can…
3) Install tomcat8 from extra
4) Configure tomcat8 to use Oracle JVM à la systemd:

# cp /usr/lib/systemd/system/tomcat8.service /etc/systemd/system/
# vim /etc/systemd/system/tomcat8.service

In this last line you want to change

Environment=TOMCAT_JAVA_HOME=/usr/lib/jvm/java-7-openjdk

by

Environment=TOMCAT_JAVA_HOME=/usr/lib/jvm/java-8-oracle

Then start Tomcat 8 and check it is started with Oracle JVM by visiting http://localhost:8080/manager/status:

Tomcat Version	JVM Version	JVM Vendor	OS Name	OS Version	OS Architecture	Hostname	IP Address
Apache Tomcat/8.0.11	1.8.0_20-b26	Oracle Corporation	Linux	3.16.1-1-ARCH	amd64	columbia	127.0.0.1

Last edited by Wikimig (2014-08-26 20:40:45)

Offline

#10 2014-08-26 20:42:25

Wikimig
Developer
From: France
Registered: 2004-12-10
Posts: 77
Website

Re: Tomcat installation without OpenJDK

BTW this is already explained in the wiki.

Offline

Board footer

Powered by FluxBB