P. 1
Cristian Frasinaru-Curs Practic de Java

Cristian Frasinaru-Curs Practic de Java

|Views: 3|Likes:
Published by Andreea gin
curs
curs

More info:

Published by: Andreea gin on May 23, 2013
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

05/23/2013

pdf

text

original

Setarea c˘aii de c˘autare se poate face ˆın dou˘a modalit˘at¸i:

• Setarea variabilei de mediu CLASSPATH - folosind aceast˘a variant˘a
toate aplicat¸iile Java de pe ma¸sina respectiv˘a vor c˘auta clasele necesare

ˆın directoarele specificate ˆın variabila CLASSPATH.

6.3. ARHIVE JAR

157

UNIX:

SET CLASSPATH = cale1:cale2:...

DOS shell (Windows 95/NT/...):

SET CLASSPATH = cale1;cale2;...

• Folosirea opt¸iunii-classpathla compilarea¸si interpretarea programelor
- directoarele specificate astfel vor fi valabile doar pentru comanda

curent˘a:

javac - classpath

java - classpath

Lansarea ˆın execut¸ie a aplicatiei noastre, din directorul matematica, se

va face astfel:

java -classpath clase Matematica

In concluzie, o organizare eficient˘a a fi¸sierelor aplicat¸iei ar ar˘ata astfel:

/matematica

/surse

/clase

compile.bat

(javac -sourcepath surse surse/Matematica.java -d clase)

run.bat

(java -classpath clase Matematica)

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->