Collegamento con i compilatori
  • In diretta da GamesVillage.it
    • News
    • -
    • In Evidenza
    • -
    • Recensioni
    • -
    • RetroGaming
    • -
    • Anteprime
    • -
    • Video
    • -
    • Cinema

Pag 1 di 2 12 UltimoUltimo
Visualizzazione risultati da 1 a 15 di 25

Discussione: Collegamento con i compilatori

Cambio titolo
  1. #1
    Utente
    Registrato il
    09-04
    Località
    Pisa
    Messaggi
    49

    Collegamento con i compilatori

    Salve, ho appena installato la jdk nuova, come faccio a inserire in emacs e in kdevelop il path al compilatore di java? (ora come ora quando tento di compilare mi da errore :/)
    Linux Mandrake 10.0
    Microstar (MEDION) WAD 2000,
    AMD Athalon 64 Processor 3000+
    ethernet BMC4401 100Base-T
    Graphic Card Redeon Mobility 9600
    Audio Card VT8233 [AC97 Audio Controller)

  2. #2
    Utente L'avatar di Phoenix
    Registrato il
    10-02
    Località
    Midwich Street
    Messaggi
    6.699
    Uhm...
    in /etc/profile:
    Codice:
    JAVA_HOME=/usr/lib/j2se/1.4/
    export JAVA_HOME
    Ma forse questo era solo per JSP...
    Casomai aggiungi al PATH, nello stesso file, il path della directory bin del jre.
    Tutto da root.
    Poi fai source /etc/profile o riavvia.


    He who is not bold enough to be stared at from across the abyss
    is not bold enough to stare into it himself.

  3. #3
    Utente
    Registrato il
    09-04
    Località
    Pisa
    Messaggi
    49
    No, dunque, la jdk si è installata in //opt/jdk1.5.0 e i binari come javac o java o javadoc sono in //opt/jdk1.5.0/bin
    per ora posso compilare solo da shell perchè mi sono fatto un'alias che punta a javac
    non so cos'è il jsp (e tantomeno il jre o_O'), ma credo che sia sufficiente il jdk per compilare con emacs e kdevelop (quest'ultimo mi interessava in particolare)
    ho messo
    JAVA_HOME=//opt/jdk1.5.0/bin/
    export JAVA_HOME

    ma non è servito o_O
    Linux Mandrake 10.0
    Microstar (MEDION) WAD 2000,
    AMD Athalon 64 Processor 3000+
    ethernet BMC4401 100Base-T
    Graphic Card Redeon Mobility 9600
    Audio Card VT8233 [AC97 Audio Controller)

  4. #4
    Utente L'avatar di Phoenix
    Registrato il
    10-02
    Località
    Midwich Street
    Messaggi
    6.699
    Hai riavviato dopo averlo messo?
    Comunque se usi solo Java e non JSP (che è un linguaggio per il web basato su Java) dovrebbe bastarti aggiungere /opt/jdk1.5.0/bin/ tra le directory indicate in PATH sempre in quel file.


    He who is not bold enough to be stared at from across the abyss
    is not bold enough to stare into it himself.

  5. #5
    Utente
    Registrato il
    09-04
    Località
    Pisa
    Messaggi
    49
    No aspetta allora può darsi che ho inserito la cosa sbagliata nel posto sbagliato, io ho inserito questo
    JAVA_HOME=//opt/jdk1.5.0/bin/
    export JAVA_HOME
    dove capitava all'interno del file da te citato, non avendo altre indicazioni non ho fatto attenzione a dove finiva
    cmq si ho solo jdk, e lo uso solo per farci applicazioni didattiche (per l'università)
    Linux Mandrake 10.0
    Microstar (MEDION) WAD 2000,
    AMD Athalon 64 Processor 3000+
    ethernet BMC4401 100Base-T
    Graphic Card Redeon Mobility 9600
    Audio Card VT8233 [AC97 Audio Controller)

  6. #6
    Utente L'avatar di Phoenix
    Registrato il
    10-02
    Località
    Midwich Street
    Messaggi
    6.699
    Sì quello lo puoi mettere dove di pare, ma mi sa che serve solo per JSP (per Tomcat) che tu non usi.
    Se usi solo Java ti basta aggiungere, sempre in quel file, dove c'è la riga PATH:/usr/bin/:/usr/local/bin eccetera, anche il percorso /opt/jdk1.5.0/bin.


    He who is not bold enough to be stared at from across the abyss
    is not bold enough to stare into it himself.

  7. #7
    Utente
    Registrato il
    09-04
    Località
    Pisa
    Messaggi
    49
    scusa se faccio il tardo, ma non trovo il path da te indicato, o meglio, ne trovo diversi (e all'interno di if o_O)

    # /etc/profile -*- Mode: shell-script -*-
    # (c) MandrakeSoft, Chmouel Boudjnah <[email protected]>

    loginsh=1

    # Users generally won't see annoyng core files
    [ "$UID" = "0" ] && ulimit -S -c 1000000 > /dev/null 2>&1

    if ! echo ${PATH} |grep -q /usr/X11R6/bin ; then
    PATH="$PATH:/usr/X11R6/bin"
    fi

    if [ "$UID" -ge 500 ] && ! echo ${PATH} |grep -q /usr/games ; then
    export PATH=$PATH:/usr/games
    fi

    umask 022

    USER=`id -un`
    LOGNAME=$USER
    MAIL="/var/spool/mail/$USER"
    HISTCONTROL=ignoredups
    HOSTNAME=`/bin/hostname`
    HISTSIZE=1000

    if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
    INPUTRC=/etc/inputrc
    fi

    # Aggiunte Personali
    JAVA_HOME=//opt/jdk1.5.0/bin
    export JAVA_HOME

    # some old programs still use it (eg: "man"), and it is also
    # required for level1 compliance for LI18NUX2000

    NLSPATH=/usr/share/locale/%l/%N

    export PATH PS1 USER LOGNAME MAIL HOSTNAME INPUTRC NLSPATH
    export HISTCONTROL HISTSIZE

    for i in /etc/profile.d/*.sh ; do
    if [ -x $i ]; then
    . $i
    fi
    done

    unset i

    if [ $LD_LIBRARY_PATH ]
    then
    if ! set | grep LD_LIBRARY_PATH | grep /usr/X11R6/lib:/usr/X11R6/lib/modules > /dev/null
    then
    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/X11R6/lib:/usr/X11R6/lib/modules
    export LD_LIBRARY_PATH
    fi
    else
    LD_LIBRARY_PATH=/usr/X11R6/lib:/usr/X11R6/lib/modules
    export LD_LIBRARY_PATH
    fi
    Linux Mandrake 10.0
    Microstar (MEDION) WAD 2000,
    AMD Athalon 64 Processor 3000+
    ethernet BMC4401 100Base-T
    Graphic Card Redeon Mobility 9600
    Audio Card VT8233 [AC97 Audio Controller)

  8. #8
    Utente L'avatar di Phoenix
    Registrato il
    10-02
    Località
    Midwich Street
    Messaggi
    6.699
    Che palle Mandrake
    Guarda se c'è in ~/.bashrc


    He who is not bold enough to be stared at from across the abyss
    is not bold enough to stare into it himself.

  9. #9
    Utente
    Registrato il
    09-04
    Località
    Pisa
    Messaggi
    49
    no, ma questo è l' "ls" della dir //etc/

    a2ps.cfg
    a2ps-site.cfg
    acpi/
    adjtime
    aliases@
    alternatives/
    armagetron/
    asound.state
    at.deny
    bash_completion.d/
    bashrc
    bonobo-activation/
    bootsplash/
    chbgrc
    CORBA/
    cron.d/
    cron.daily/
    cron.hourly/
    cron.monthly/
    crontab
    cron.weekly/
    csh.cshrc
    csh.login
    cups/
    cvs/
    default/
    devfs/
    devfsd.conf
    DIR_COLORS
    dumpdates
    dynamic/
    emacs/
    enscript/
    enscript.cfg
    esd.conf
    exports
    fam.conf
    fax.config
    fdprm
    filesystems
    fonts/
    foomatic/
    fstab
    gconf/
    gimp/
    gnome/
    gnome-vfs-2.0/
    gnome-vfs-mime-magic
    gnucash/
    gre.conf
    group
    group-
    gshadow
    gshadow-
    gtk/
    gtk-2.0/
    host.conf
    hosts
    hosts.allow
    hosts.deny
    hotplug/
    hotplug.d/
    ifplugd/
    im_palette.pal
    im_palette-small.pal
    im_palette-tiny.pal
    imrc
    info-dir
    init.d@
    initlog.conf
    inittab
    inputrc
    iproute2/
    issue
    issue.net
    krb5.conf
    ksysguarddrc
    ld.so.cache
    ld.so.conf
    LexmarkZ11/
    lftp.conf
    libuser.conf
    lilo.conf
    locale/
    localtime
    login.defs
    logrotate.conf
    logrotate.d/
    lsb-release
    ltrace.conf
    lynx-site.cfg
    mailcap
    mailcap.base
    mailcap.vga
    mail.rc
    makedev.d/
    man.config
    mandrake-release
    mcc.conf*
    menu/
    menu-methods/
    mime-magic
    mime-magic.dat
    mime.types
    modprobe.conf
    modprobe.devfs
    modprobe.preload
    modules
    modules.conf
    modules.devfs
    motd
    mtab
    mtools.conf
    netplug/
    netplug.d/
    netprofile/
    nsswitch.conf
    oaf/
    openldap/
    openoffice/
    pam.d/
    pango/
    paper.config
    passwd
    passwd-
    pbm2ppa.conf
    pcmcia/
    pentaxpj.conf
    pnm2ppa.conf
    postfix/
    ppp/
    printcap
    printer/
    profile
    profile.d/
    protocols
    pwdb.conf
    qt_plugins_3.2rc
    raidtab
    rc@
    rc0.d@
    rc1.d@
    rc2.d@
    rc3.d@
    rc4.d@
    rc5.d@
    rc6.d@
    rc.d/
    rc.local@
    rc.sysinit@
    redhat-release@
    resolv.conf
    rmt@
    rpc
    rpm/
    RPM-GPG-KEYS/
    samba/
    sane.d/
    screenrc
    scrollkeeper.conf
    secure-mcservusers
    securetty
    security/
    services
    sgml/
    shadow
    shadow-
    shells
    skel/
    sound/
    ssh/
    ssl/
    sudoers
    sysconfig/
    sysctl.conf
    syslog.conf
    termcap
    updatedb.conf
    urpmi/
    wgetrc
    X11/
    xclass-mime.types
    xclassrc
    xdg/
    xinetd.conf
    xinetd.d/
    xml/

    può trovarsi in uno di questi?
    Linux Mandrake 10.0
    Microstar (MEDION) WAD 2000,
    AMD Athalon 64 Processor 3000+
    ethernet BMC4401 100Base-T
    Graphic Card Redeon Mobility 9600
    Audio Card VT8233 [AC97 Audio Controller)

  10. #10
    Utente L'avatar di Phoenix
    Registrato il
    10-02
    Località
    Midwich Street
    Messaggi
    6.699
    Prova a vedere se è in altri file con
    grep -e "^PATH" /etc/*

    altrimenti semplicemente aggiungi questa riga a /etc/profile, non penso che Mdk si arrabbierà
    fallo diventare così:

    Codice:
    # /etc/profile -*- Mode: shell-script -*-
    # (c) MandrakeSoft, Chmouel Boudjnah <[email protected]>
    
    PATH="/usr/local/bin:/usr/bin:/bin:/sbin:/usr/sbin:/usr/bin/X11:/usr/games:/opt/jdk1.5.0/bin"
    
    loginsh=1
    
    # Users generally won't see annoyng core files
    ......tutto il resto


    He who is not bold enough to be stared at from across the abyss
    is not bold enough to stare into it himself.

  11. #11
    Utente
    Registrato il
    09-04
    Località
    Pisa
    Messaggi
    49
    Good news, ho trovato contab e rc.sysinit che contengono stringhe simili
    Bad news, non mi da problemi inserendo quella stringa ma il kdevelop continua a non collegarsi ai binari del jdk per compilare e mi da errore
    Linux Mandrake 10.0
    Microstar (MEDION) WAD 2000,
    AMD Athalon 64 Processor 3000+
    ethernet BMC4401 100Base-T
    Graphic Card Redeon Mobility 9600
    Audio Card VT8233 [AC97 Audio Controller)

  12. #12
    Utente L'avatar di Phoenix
    Registrato il
    10-02
    Località
    Midwich Street
    Messaggi
    6.699
    crontab lascialo perdere, postami un head dell'altro.
    Ma hai riavviato dopo aver aggiunto la stringa che ti ho detto al profile? A questo punto aggiungila anche a ~/.bashrc,

    Codice:
    PATH="/usr/local/bin:/usr/bin:/bin:/sbin:/usr/sbin:/usr/bin/X11:/usr/games:/opt/jdk1.5.0/bin"
    export PATH
    Ma se da console scrivi java e premi TAB (due volte) ti trova gli eseguibili (tipo javac)?
    Perchè potrebbe anche essere un problema di impostazioni di KDevelop.


    He who is not bold enough to be stared at from across the abyss
    is not bold enough to stare into it himself.

  13. #13
    Utente
    Registrato il
    09-04
    Località
    Pisa
    Messaggi
    49
    #!/bin/bash
    #
    # /etc/rc.d/rc.sysinit - run once at boot time
    #
    # Taken in part from Miquel van Smoorenburg's bcheckrc.
    #
    # Rerun ourselves through initlog
    if [ -z "$IN_INITLOG" -a -x /sbin/initlog ]; then
    exec /sbin/initlog $INITLOG_ARGS -r /etc/rc.d/rc.sysinit
    fi
    # Set the path
    PATH=/bin:/sbin:/usr/bin:/usr/sbin
    export PATH
    HOSTNAME=`/bin/hostname`
    if [...]

    era un file txt da 33kbyte, semplicemente non entrava nel reply

    si cmq li trova (alcuni li avevo impostati con alias, ma ci sono anche altri che non avevo impostato io) ma come faccio a settare emacs e kdevelop?
    Linux Mandrake 10.0
    Microstar (MEDION) WAD 2000,
    AMD Athalon 64 Processor 3000+
    ethernet BMC4401 100Base-T
    Graphic Card Redeon Mobility 9600
    Audio Card VT8233 [AC97 Audio Controller)

  14. #14
    Utente L'avatar di Phoenix
    Registrato il
    10-02
    Località
    Midwich Street
    Messaggi
    6.699
    Mi sa che era quello il file che dovevi editare al posto di /etc/profile in Mdk.

    Ma proprio gli unici editor che non ho mai usato devi utilizzare?
    Esattamente cos'è che succede?
    Io solitamente compilo separatamente in una console usando javac, non so come funzionino emacs e kdevelop


    He who is not bold enough to be stared at from across the abyss
    is not bold enough to stare into it himself.

  15. #15
    Utente
    Registrato il
    09-04
    Località
    Pisa
    Messaggi
    49
    nulla, ho provato ad editare anche quello ma non succede nulla
    in pratica quando compilo mi da errore 127
    Il fatto è che con emacs (e soprattutto con kdevelop) è molto + pratico programmare, cmq non è una cosa essenziale, solo mi pare assurdo che bisogna sudare sette camice per un banalissimo link sballato
    Linux Mandrake 10.0
    Microstar (MEDION) WAD 2000,
    AMD Athalon 64 Processor 3000+
    ethernet BMC4401 100Base-T
    Graphic Card Redeon Mobility 9600
    Audio Card VT8233 [AC97 Audio Controller)

Pag 1 di 2 12 UltimoUltimo

Regole di Scrittura

  • Tu non puoi inviare nuove discussioni
  • Tu non puoi inviare risposte
  • Tu non puoi inviare allegati
  • Tu non puoi modificare i tuoi messaggi
  •