Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]problemi compilazione programmino java
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
cirpo
Tux's lil' helper
Tux's lil' helper


Joined: 07 Nov 2003
Posts: 111

PostPosted: Fri Nov 11, 2005 12:34 am    Post subject: [SOLVED]problemi compilazione programmino java Reply with quote

Ciao, la discussione non e' da considerarsi off-topic in quanto credo sia un problema di sistema(o almeno di configurazione dello stesso).
Dunque questo e' un semplicissimo programmino scritto in java:
Code:
import java.util.* ;
import java.lang.* ;

class N {

        public static  void main (String[] arg){

                Random generatore = new Random();
                 int i = generatore.nextInt(91);
                System.out.println(i);
        }
}


Il seguente codice risiede nella home dir del mio utente, se lo compilo rimanendo in tale directory ottengo il seguente errore:
Code:
obelix cirpo # javac N.java
N.java:9: cannot resolve symbol
symbol  : method nextInt (int)
location: class Random
                 int i = generatore.nextInt(91);
                                   ^
1 error
obelix cirpo #                 


mentre se lo compilo da qualsiasi altro path tutto fila liscio.PERCHE'?

grazie


Last edited by cirpo on Fri Nov 11, 2005 3:36 pm; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30996
Location: here

PostPosted: Fri Nov 11, 2005 8:01 am    Post subject: Reply with quote

Nel senso che non compili da utente normale ma solo da root?
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
cirpo
Tux's lil' helper
Tux's lil' helper


Joined: 07 Nov 2003
Posts: 111

PostPosted: Fri Nov 11, 2005 10:00 am    Post subject: Reply with quote

No, nel senso che sia da root che da utente normale compila solo esclusivamente fuori dalla directory un cui e' contenuto il sorgente.
Back to top
View user's profile Send private message
Drospy
n00b
n00b


Joined: 29 Aug 2003
Posts: 42
Location: Cosenza, Italy

PostPosted: Fri Nov 11, 2005 10:10 am    Post subject: Reply with quote

Ciao,

hai verificato che all'interno della directory dove lanci la compilazione non ci sia qualche classe che ha al suo interno il metodo generatore oppure ci sia una versione del compilatore che è diversa da quella usata normalmente?

Spero di essere stato chiaro.
Drospy
Back to top
View user's profile Send private message
lavish
Bodhisattva
Bodhisattva


Joined: 13 Sep 2004
Posts: 4296

PostPosted: Fri Nov 11, 2005 10:16 am    Post subject: Reply with quote

Drospy wrote:
[...]

Infatti è quello che penso anche io. Prova in caso a postare il contenuto della dir
_________________
minimalblue.com | secgroup.github.io/
Back to top
View user's profile Send private message
cirpo
Tux's lil' helper
Tux's lil' helper


Joined: 07 Nov 2003
Posts: 111

PostPosted: Fri Nov 11, 2005 3:35 pm    Post subject: Reply with quote

avevate ragione...
Drospy wrote:

hai verificato che all'interno della directory dove lanci la compilazione non ci sia qualche classe che ha al suo interno il metodo generatore

scusate la perdita di tempo per un problema cosi' stupido, potevo(dovevo) risolvere da solo.

grazie cmq
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum