NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

-Xmx
*bu option maximum kullanılacak heap(Objelerin store edildiği yer ) size'ını ayarlar.
*İşletim sistemine göre , set ettiğin size farklılık gösterebilir. (pek önemli değil bu)
örnek
java -Xmx:1g myApp --- maximum heap i 1gb yapar.
-----------------------------------------------------------------
-Xms
*bu option initial ve minimum heap size'ını ayarlar.
* NOT: JVM 'in kullanacağı toplam hafızayı sınırlamaz. mesela JVM 30mb kullanıcak ama sen -Xms ile heap min'u 64mb yaptın. JVM yine 30mb kullanır.JVM e karışamaz yani.
örnek
java -Xms:64m myApp --- minimum heap 64mb yapar
birimi yazmasan yani "-Xms:64 myApp" yazarsan , 64 64 bayt alarak değerlendirilecek.
En iyi performans için -Xms i -Xmx ile aynı değere getirmek lazım aşağıdaki gibi
(java -Xgcprio:throughput(garbage collector için optimizasyon şeysi) -Xmx:64m -Xms:64m myApp)
--------------------------------------------------------------------
-server ve -client
iki tane VM var aslında 2 ayrı JIT compiler desek daha iyi
( Java Hotspot client VM - Java Hotspot server VM )
( client mode - server mode )
----client modun----- JIT compiler'ı bytecode'u yüklenir yüklenmez , machine code a compile eder.
----server modun---- JIT compiler'ı daha complex. Kod yorumlanırken JVM tarafından profiling (2) tekniği ile ölçümler gerçekleştirlir. Bu veriler baz alınarak kodun hangi bölümlerinin JIT ile derleneceği kararı alınır ve kod derlenir. JIT derleme (3) işlemi esnasında tüm bilgilere sahip olamayacağından bazı varsayımlarda bulunur ve spekülasyona dayalı kararlar neticesinde derleme işlemini gerçekleştirir. Bazı şartlar altından bu varsayımlar geçerliliklerini kaybettiklerinden, derlenen kod işe yaramaz hale gelir ve bir kenara bırakılarak (4), yeniden yorumlama (1) moduna geçilir. Bu döngü uygulamanın hayatı boyunca devam eder. Belli bir kullanım süresinden sonra kod hakkında toplanan bilgiler yeterli olduğundan, kodun çok kullanılan alanları derlenmiş olur ve bu da Java uygulamalarını C/C++ uygulamaları gibi hızlı kılar.

yani server modun compilerı clienttan çok daha akıllı.ama uygulamayı ilk kez çalıştırdığında client mod ile derlenmiş kod , server mod ile derlenmiş koda göre daha hızlıdır. bir kaç çalıştırmadan sonra server mode client kadar hızlı olur belki daha hızlı. GUI kullanılacaksa client daha iyi diyorlar ama genelleme yaparsak artık client eskidi ,server kullanılıyor.
kısaca , -server ve -client optionları ilgili compilerı kullanmaya yarıyor.
---------------------------------------------------------------------
-classpath
bu option environment variabledaki CLASSPATH i override eder cmd yi kapatınca yaptıkların gider.
(CLASSPATH is an environment variable that helps us to educate the Java Virtual Machine from where it will
start searching for .class files.)

CLASSPATH is an environment variable that helps us to educate the Java Virtual Machine from where it will start searching for .class files.
We should store the root of the package hierarchies in the CLASSPATH environment variables.
In case of adding or using jar libraries in our project, we should put the location of the jar file in the CLASSPATH environment variable.

e.g if we are using jdbc mysql jar file in our java project, We have to update the location of the mysql jar file in the CLASSPATH environment variable. if our mysql.jar is in c:drivermysql.jar then

We can set the classpath through DOS in Windows
set CLASSPATH=%CLASSPATH%;c:drivermysql.jar
---------------------------------------------------------------
-jar fileName
jar ile işlem yapacaksan yazman lazım. fileName jar dosyasının ismidir. manifestte belirlenen mainClassta main metod olması lazım (mesela mavenda şöyle <mainClass>HelloWorld</mainClass> )
--------------------------------------------------------------
-verbose:class
çağırılan yüklenen her classla ilgili bilgi gösterir
---------------------------------------------------------------
-verbose:gc
garbage collection'ta olan olaylarla ilgili bilgi gösterir
--------------------------------------------------------------
verbose:jni
native methodların ve Java Native Interface'in kullanımı hakında bilgi gösterir.
-----------------------------------------------------------
-version
versiyonu gösterir
-------------------------------------------------------------
-showversion
versiyonu gösterir
---------------------------------------------------------------
-splash:imgname
programın açılırken resim gösterir
-splash:images/splash.gif
-----------------------------------------------------------
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.