DART on Googlen avoimen lähdekoodin ohjelmointikieli, joka toimii verkkosivuilla ja servereissä, ja jolla voi JavaScriptiä paremmin hoitaa suurten verkkosovellusten koodaamisen. DART kielen kehitys aloitettiin 9/2011 ja 1.0-versio kielestä julkistettiin loppuvuodesta -2013. Nyt jo on olemassa lähes valmiit työkalut Chrome selainta varten. Blogger-blogien pitäjiä varten saamme ehkä kiintoisia Gadgetteja sivupalkkeihin ja muuta toiminnallisuutta verkkosivuille.
TÄMÄ blogi sisältää pääosin omia pohdintojani ja muistiinpanoja, eikä se varmaankaan tuo kovinkaan paljon uutta DART-kielen opiskeluun. Materiaali on pääosin KOPIOITU :( Dartlang-sivustoilta, josta kannattaa KÄYDÄ TARKISTAMASSA kielen viimeiset syntaksit.

sunnuntai 3. marraskuuta 2013

Setting environment variable for Java in dart-editors .ini file in windows7

TL:DR  just watch 10 last rows... :)

I have so far kept my jre in dart program folder... but
1. Java version there is old & difficult to update
2. I wonder if it conflicts with Chrome browser....  SLOW SLOW..
So trying to find better solution....


Path to Java7=  C:\Program Files (x86)\Java\jre7

My darteditor.ini  -file is now:

-data
C:\Users\Public\dartinit
-vmargs
-d64
-Dosgi.requiredJavaVersion=1.6
-XX:MaxPermSize=128m
-Xms256m
-Xmx2000m

Instructions in:  https://www.dartlang.org/tools/editor/troubleshoot.html
Specifying the Java runtime..
If necessary, you can specify the Java runtime that Dart Editor uses. Go to your Dart installation directory and add the following two lines to DartEditor.ini immediatelybefore the existing ‑vmargs line:
-vm
/full/path/to/java
Important: On Windows, use double backslashes (\\) as the directory separator:
-vm
c:\\bin\\java_jdk1.7.0\\bin\\javaw.exe
For example, DartEditor.ini might have:
...
-vm
/usr/local/buildtools/java/jdk-64/bin/java
-vmargs
HOW SHOULD I UNDERSTAND THIS INSTRUCTION ??   //  OR  \  ??


so I should put this, to my darteditor.ini file:  

-vm
C:\Program Files (x86)\Java\jre7  comes to:  C:\\Program Files (x86)\\Java\\jre7

So, that after change my darteditor.ini file is:
-data
C:\Users\Public\dartinit
-vm
C:\\Program Files (x86)\\Java\\jre7
-vmargs
-d64
-Dosgi.requiredJavaVersion=1.6
-XX:MaxPermSize=128m
-Xms256m
-Xmx2000m

Does it work?   I dont think so.  Is that \\jre7    must there?
Lets see tomorrow morning at coffee time....

TEST_1,   -vm     C:\\Program Files (x86)\\Java\\jre7      no way  :( 
   Wau... coffee is almost ready..
TEST_2,              C:\Program Files (x86)\Java\jre7          no way  :( 
TEST_3,  ???       C:\\Program Files (x86)\\Java\\jre7\\bin   no way  :(  Failed to load jni shared library..  \client\jvm.dll
TEST_4               C:\Program Files (x86)\Java\jre7\bin      no way 
TEST_5               C:\Program Files (x86)\Java\jre7\bin\jvm.dll   no way
At least these tests are quick to do...
"But this just worked: remove the -vm line I just added, then delete the -vmargs line.  Saved that, double-clicked on darteditor, and hey, presto! darteditor popped up!"   WTF ?  ;)

More coffee...

Reading   https://groups.google.com/a/dartlang.org/forum/#!topic/misc/5eLJLBsEL2E
C:\Program Files\Java\jdk1.6.0_30\bin\javaw.exe
"  I've solved this problem by deleting line .  -XX:MaxPermSize=256m. from my DartEditor.ini   "  ??

https://code.google.com/p/dart/issues/detail?id=6049 
Issue 6049: Failed to create the Java virtual machine

"Rather than removing those lines, could you try specifying your VM?  For example:
-vm
D:\Java\jdk1.6.0_29\bin\javaw.exe     "   More more nore coffee, it's dark outside..

So at leaset two backslashes is right in Windows!!  //
TEST_6     C:\\Program Files (x86)\\Java\\jre7\\bin\\javaw.exe     Getting something...
                  ERROR:  This Java instance does not support a -64 bit-JVM ..install desired...
TEST_7     C:\Program Files (x86)\Java\jre7\bin\javaw.exe     same error...
             in  C:\Program Files    I have no Java..  so  32 bit???

Should I return to my earlier version of jre, in my dart program folder???
TEST_8     C:\Users\Public\dart\jre          no way
------------------------------------------------------------------------------------------------
some New tests: 17.12.2013.. (why?)
x
  testing no jawaw.exe, but  jawa.exe !!!
-vm
C:\\Program Files (x86)\\Java\\jre7\\bin\\jawa.exe   No Java virtual machine !!   :(


-vm
C://Program Files (x86)//Java//jre7//bin//jawa.exe     LOL  nothing happends, I press more times, and then I have 3 DartEditor on run, WITH SMALL ERROR BOXES.
Why am I trying this ?


-------------------------------------------------------------------------------------------------
TEST_9     C:\Users\Public\dart\jre\bin    succes, it works.  Coffee, its gray & raining.
This jre is where I loaded (32bit??) jre a year ago.  do'es it matter?  Is it too old?
Is it security risk??   Sad:  I can't update it easily.
QUESTION:  does it work if I move it to program-folder?
AND THIS HAVE ALWAYS WORKED. EVEN WITHOUT THIS -vm  statement.
So I'm back in my old system, without means to use easily updated Java / jre.

TEST_10  deleting  -vm  statement:  now my dart.ini -file is:
-data
C:\Users\Public\dartinit                                                  //  my special solution.
-vmargs
-d64
-Dosgi.requiredJavaVersion=1.6
-XX:MaxPermSize=128m
-Xms256m
-Xmx2000m                              
                                  And it works, cos I have jre in my Dart program folder.
                                  so this is still unsolved...  lol.. more coffee.. more raining...

The worst panic over :) A steady stream of back-breaking work. Readings and runs remppa .. Procrastinate though, the wisdom accrued. Morning coffee, in November, it's raining ..

@etanatikku twitter  = now  @kasuava twitter.
Hahaa!! Tasaista puurtamista => G-Translate => A steady stream of back-breaking work.
.

Ei kommentteja:

Lähetä kommentti