— Scott McNealy, Sun Microsystems Chairman, President and ceo



Download 40,57 Mb.
Pdf ko'rish
bet551/555
Sana26.05.2022
Hajmi40,57 Mb.
#609235
1   ...   547   548   549   550   551   552   553   554   555
Bog'liq
Head First Java (Kathy Sierra, Bert Bates) (z-lib.org)

-d 
compiler flag: 

cd source
%
javac -d ../classes com/wickedlysmart/Foo.java
ß
To run your code, cd to the classes directory, and give the fully-qualified 
name of your class: 
% cd classes

java com.wickedlysmart.Foo
ß
You can bundle your classes into JAR (Java ARchive) files. JAR is based 
on the pkzip format.
ß
You can make an executable JAR file by putting a manifest into the JAR 
that states which class has the main() method. To create a manifest file, 
make a text file with an entry like the following (for example): 
Main-Class: com.wickedlysmart.Foo
ß
Be sure you hit the return key after typing the Main-Class line, or your 
manifest file may not work.
ß
To create a JAR file, type: 
jar -cvfm manifest.txt MyJar.jar com
ß
The entire package directory structure (and only the directories matching 
the package) must be immediately inside the JAR file. 
ß
To run an executable JAR file, type: 
java -jar MyJar.jar
 
there are no
Dumb Questions
Q:
 What happens if you try 
to run an executable JAR, and 
the end-user doesn’t have java 
installed?
A: 
Nothing will run, since 
without a JVM, Java code can’t 
run. The end-user must have Java 
installed.
Q: 
How can I get Java 
installed on the end-user’s 
machine?
Ideally, you can create a custom 
installer and distribute it along 
with your application. Several 
companies offer installer pro-
grams ranging from simple to 
extremely powerful. An installer 
program could, for example, de-
tect whether or not the end-user 
has an appropropriate version 
of Java installed, and if not, 
install and configure Java before 
installing your application. 
Installshield, InstallAnywhere, 
and DeployDirector all offer Java 
installer solutions.
Another cool thing about some 
of the installer programs is that 
you can even make a deploy-
ment CD-ROM that includes 
installers for all major Java 
platforms, so... one CD to rule 
them all. If the user’s running on 
Solaris, for example, the Solaris 
version of Java is installed. On 
Windows, the Windows, ver-
sion, etc. If you have the budget, 
this is by far the easiest way for 
your end-users to get the right 
version of Java installed and 
configured.



Download 40,57 Mb.

Do'stlaringiz bilan baham:
1   ...   547   548   549   550   551   552   553   554   555




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish