How to find if it's 32 or 64 bits? Tomcat - version

I recently downloaded Tomcat 7.x as a zip. Running the version.bat gives the following:
c:\apache-tomcat-7.0.19\bin>version
Using CATALINA_BASE: "C:\apache-tomcat-7.0.19"
Using CATALINA_HOME: "c:\apache-tomcat-7.0.19"
Using CATALINA_TMPDIR: "C:\apache-tomcat-7.0.19\temp"
Using JRE_HOME: "C:\Program Files (x86)\Java\jdk1.6.0_29"
Using CLASSPATH: "c:\apache-tomcat-7.0.19\bin\bootstrap.jar;C:\apache-tomcat- 7.0.19\bin\tomcat-juli.jar"
Server version: Apache Tomcat/7.0.19
Server built: Jul 13 2011 11:32:28
Server number: 7.0.19.0
OS Name: Windows Server 2008 R2
OS Version: 6.1
Architecture: x86
JVM Version: 1.6.0_29-b11
JVM Vendor: Sun Microsystems Inc.
Since it's using the 32 bit version of JRE, is it a safe assumption the Tomcat itself is 32-bit?

In the Tomcat bin folder, there is version.bat (version.sh for linux) script. Run it to get version and architecture information. Here is example output for Tomcat 7.062 running 32 bit (x86) on Windows:
C:\KBData\Software\apache-tomcat-7.0.62\bin>version
Using CATALINA_BASE: "C:\KBData\Software\apache-tomcat-7.0.62"
Using CATALINA_HOME: "C:\KBData\Software\apache-tomcat-7.0.62"
Using CATALINA_TMPDIR: "C:\KBData\Software\apache-tomcat-7.0.62\temp"
Using JRE_HOME: "C:\Program Files (x86)\Java\jdk1.7.0_25\"
Using CLASSPATH: "C:\KBData\Software\apache-tomcat-7.0.62\bin\bootstrap.ja
r;C:\KBData\Software\apache-tomcat-7.0.62\bin\tomcat-juli.jar"
Server version: Apache Tomcat/7.0.62
Server built: May 7 2015 17:14:55 UTC
Server number: 7.0.62.0
OS Name: Windows 7
OS Version: 6.1
Architecture: x86
JVM Version: 1.7.0_25-b17
JVM Vendor: Oracle Corporation

The Windows distributions contain executables and a DLL to run Tomcat as a service. You can unzip the download & run Dependency Walker (free) or dumpbin.exe (comes with MS Visual Studio) on the executable to see which processor architecture they support.
See this question for more details: In windows,how do we identify whether a file is 64 bit or 32 bit?
Java programs aren't 32-bit or 64-bit as native programs are. They run in a virtual machine with a standard architecture. Only the JRE, which implements the virtual machine, is 32-bit or 64-bit.

Related

Not able to find JAVA in schroot

I am trying compile AOSP code using schroot in ubuntu 18.04 64 bit.
Not able to find java in schroot.
$java -version
bash: java: command not found
If I open another terminal and enter java version command its working. like below
java -version
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
Do you have the jdkX repo synced in? AOSP provides the prebuilts, for android 10, it is jdk9. For example, if I run the following command I get openjdk9:
. build/envsetup.sh && lunch aosp_blueline-userdebug
which java && java --version
Output:
prebuilts/jdk/jdk9/linux-x86/bin/java
openjdk 9
OpenJDK Runtime Environment (build 9+181-android4685155)
OpenJDK 64-Bit Server VM (build 9+181-android4685155, mixed mode)
Try running your java commands after lunch.

Installing Android SDK Manager on Ubuntu 18.04

I'm trying to install Android SDK (not Studio) following this tutorial - https://linoxide.com/linux-how-to/install-android-sdk-manager-ubuntu/
When running sdkmanager --list I was getting the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
So amended the file ~/android-sdk-tools/bin/sdkmanager and amended the following line to be:
DEFAULT_JVM_OPTS='"-Dcom.android.sdklib.toolsdir=$APP_HOME" -XX:+IgnoreUnre cognizedVMOptions --add-modules java.se.ee'
Now the error doesn't show, but when I run sdkmanager --list it just hangs without any response.
If it helps, here's my versions of java etc:
$ java -version
openjdk version "10.0.2" 2018-07-17
OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.2)
OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.2, mixed mode)
$ javac -version
javac 10.0.2
Java version 9 and 10 are not supported for android sdk, downgrade your java version 8 or less.

Which release is stable?

i am trying to play with apache-flink, with the set of examples and i am trying to compile them from scratch using GitHub code in order to run them using the flink install from brew command.
It's funny but the brew installation does not include any of the examples, so I am forced to install them from the sources in GitHub.
The problem is i cannot compile the examples because of some errors. I understand that this compiling error can happen, i only need one stable branch to run the projects as described in the official link.
I am using this settings:
java -version
java version "1.8.0_172"
Java(TM) SE Runtime Environment (build 1.8.0_172-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.172-b11, mixed mode)
mvn -version
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T21:39:06+02:00)
Maven home: /usr/local/Cellar/maven/3.5.0/libexec
Java version: 10.0.1, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home
Default locale: es_ES, platform encoding: UTF-8
OS name: "mac os x", version: "10.13.4", arch: "x86_64", family: "mac"
This is the link of release-1.5 compile.
This is the link of release-1.3 compile.
This is the link of master compile.
Which release is stable?
EDIT
After #FabianHueske advice, i downgraded the maven version:
flink aironman$ mvn -version
Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T18:29:23+01:00)
Maven home: /usr/local/Cellar/maven#3.2/3.2.5/libexec
Java version: 10.0.1, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home
Default locale: es_ES, platform encoding: UTF-8
OS name: "mac os x", version: "10.13.4", arch: "x86_64", family: "mac"
MacBook-Pro-Retina-de-Alonso:flink aironman$ jenv versions
system
1.7
1.7.0.51
1.8
1.8.0.172
10.0
10.0.1
oracle64-1.7.0.51
* oracle64-1.8.0.172 (set by /Users/aironman/.jenv/version)
oracle64-10.0.1
MacBook-Pro-Retina-de-Alonso:flink aironman$ java -version
java version "1.8.0_172"
Java(TM) SE Runtime Environment (build 1.8.0_172-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.172-b11, mixed mode)
This is the output of the compiling of the tag release-1.5.0.
I realize that maven is trying to use version 10.0.1 of the jdk, although the command java -version says I'm using version 1.8, it might be a problem with my maven and jdk configuration?
You can only compile Flink with java 8, according to the exceptions during the build you're using java 9+.

ERROR: could not load library "oracle_fdw.dll": %1 is not a valid Win32 application

Things I've done, in order:
Downloaded and installed PostgreSQL server 9.5.7 64bit from entreprisedb.com, latest version for which oracle_fdw is available
Installed the other stuff (postGIS, Npgsql, pgAgent, etc), in 64bit variant where it gave me the choice, in the second part of the installation
Downloaded oracle_fdw-1.3.0-pg95-win64.zip from https://github.com/laurenz/oracle_fdw/releases/ and extracted all the files to where they are supposed to be, C:/Program Files/PostgreSQL/9.5/....
Ran the following command in pgAdmin:
CREATE EXTENSION oracle_fdw;
and I got the following error:
ERROR: could not load library "C:/Program Files/PostgreSQL/9.5/lib/oracle_fdw.dll": %1 is not a valid Win32 application.
Either the oracle_fdw.dll is corrupt, or it not all of your software (Oracle client?) is 64-bit.
You will need a 64-bit Oracle client installed. See the README:
Oracle client version 10.1 or better is required.
oracle_fdw can be built and used with Oracle Instant Client as well as with
Oracle Client and Server installations installed with Universal Installer.
Binaries compiled with Oracle Client 10 can be used with later client versions
without recompilation or relink.
(There are oracle_fdw binaries for PostgreSQL 9.6 as well.)

Drupal-6.25 and SQL Server 2005 slow on Linux, but fast on Windows

I've been experimenting with Drupal-6.25 installation on SQL Server 2005. I got the MSSQL driver patch from http://drupal.org/files/d6mssql.zip
The problem is, when I use Linux as OS' web server, the performance is very slow. Each page needs between 10 to 20 seconds to load.
This problem is no more when I use Windows as OS' web server. Loading page needs just miliseconds.
The Linux configurations are as follows (I tested with many Linux distros):
VMWare Workstation 8.0
Ubuntu 10.04 / Ubuntu 12.04 / Fedora 16 (IP: 192.168.14.12x)
Latest Apache2, Latest PHP 5.3.10
php5-sybase on Ubuntu, freetds on Fedora
SQL Server 2005 on my Windows-7 machine (IP: 125.0.0.7).
The Windows configuration is as follows:
Windows 7 x64 (IP: 125.0.0.7)
XAMPP 1.7.3 with PHP 5.3.8 and Freetds extension from http://docs.moodle.org/20/en/Installing_MSSQL_for_PHP
Both system, use this freetds config:
[global]
host = 125.0.0.7
port = 1433
client charset = UTF-8
tds version = 8.0
text size = 20971520
Anyone has suggestions or maybe some debugging help?
Thanks!

Resources