Tag Archive for 'JAVA'

Ubuntu 8.04 LTS + openjdk6 + apache-tomcat-6.0.18

Prerequisites
• Ubuntu 8.04 (you can try with other ubuntu/debian, with other OS you have to install JVM in a different way)
Needed files:
• apache-tomcat-6.0.18.zip from http://tomcat.apache.org/download-60.cgi

  1. sudo apt-get update
  2. sudo apt-get upgrade
  3. sudo apt-get install openjdk-6-jdk

unpack apache-tomcat-6.0.18.zip where you want (i used /usr/local/tomcat, change the following commands accordingly if you have used a different directory)

set JAVA_HOME environment variable:

  1. JAVA_HOME=/usr/lib/jvm/java-6-openjdk
  2. export JAVA_HOME

start the server:

  1. /usr/local/tomcat/bin/startup.sh

and try to navigate http://localhost:8080
stop the server:

  1. /usr/local/tomcat/bin/shutdown.sh

if you need the init.d script use this (this automatically sets JAVA_HOME)

  1. sudo nano /etc/init.d/tomcat

copy and paste the following

  1.    # Tomcat auto-start
  2.     #
  3.     # description: Auto-starts tomcat
  4.     # processname: tomcat
  5.     # pidfile: /var/run/tomcat.pid
  6.  
  7.     export JAVA_HOME=/usr/lib/jvm/java-6-openjdk
  8.  
  9.     case $1 in
  10.     start)
  11.             sh /usr/local/tomcat/bin/startup.sh
  12.             ;;
  13.     stop)  
  14.             sh /usr/local/tomcat/bin/shutdown.sh
  15.             ;;
  16.     restart)
  17.             sh /usr/local/tomcat/bin/shutdown.sh
  18.             sh /usr/local/tomcat/bin/startup.sh
  19.             ;;
  20.     esac  
  21.     exit 0

make it executable

  1. sudo chmod +x /etc/init.d/tomcat

then you can start/stop/restart tomcat in this way

  1. /etc/init.d/tomcat start
  2. /etc/init.d/tomcat stop
  3. /etc/init.d/tomcat restart

and if you want to run at boot time run this command:

  1. update-rc.d tomcat defaults

i suggest to add a default user changing the password for the tomcat admin page, to do this, edit the file:

  1. sudo nano /usr/local/tomcat/conf/tomcat-users.xml

and add in the node the following:

  1. <role rolename=”manager”/>
  2. <user username=”manager” password=”password” roles=”manager”/>

follow this guide to run zk on this tomcat freshly installation

JNI Interface used to integrate static C++/Delphi Library in Java

Today i found some great post to make an integration between JAVA and static library genetated with C++ using JNI.
post links :

  • http://forum.java.sun.com/thread.jspa?threadID=786600&messageID=4484880

  • http://www.inonit.com/cygwin/jni/helloWorld/
  • stay tuned
    ivan…

    Il gestionale synapse gira sotto Linux

    Synapse , ERP by Synaptica


    Grazie a wine, il nostro gestionale (Synapse) sviluppato con tecnologia win32 funziona perfettamente anche sulla piattaforma Linux.
    Attualmente il gestionale è ancora una beta, e si pensa passerà in alfa entro la fine del prossimo mese, grazie alle tecnologie utilizzate garantisce un estrema flessibilità, e una notevole riduzione di costi dovuto al fatto di non dover acquistare licenze addizionali per il suo funzionamento.

    Tecnologie utilizzate :

    Lato Server :
    - DB : Firebird 1.5 in versione superserver / embedded
    - Servizi : Cross JAVA

    Lato Client :
    - Piattaforma w32 sviluppata in Delphi 7.0
    - Piattaforma Web sviluppata con pHp , possibili porting per ASP.Net e JSF

    a presto

    Far convivere più JVM su Ubuntu 7.10

    Ubuntu installa di default una JVM open-source 1.4, che è un pò datata. Per installare le versioni più recenti della Sun bisogna abilitare il repository multiverse quindi selezioniamo:

    Sistema>Amministrazione>Sorgenti software

    e diamo la spunta su: “Software con restrizioni per copyright o motivi legali (multiverse)”

    Dopodichè da terminale:

    sudo apt-get install sun-java6-jre sun-java5-jre

    Questo comando installa il runtime java 1.5 e 1.6 e dovrebbe bastare per gli usi più comuni, se siete sviluppatori e vi serve altro per la lista di tutti i pacchetti relativi a Java (quelli ufficiali della sun) digitate:

    apt-cache search sun-java

    Leggi il resto dell’articolo ‘Far convivere più JVM su Ubuntu 7.10′