Search This Blog

Tuesday, January 26, 2016

Eclipse Che install on windows

Tried all the install methods on the downloads page the stuff that worked for me on windows 7 was .

Get the git from the repo.
https://github.com/codenvy/che

Follow the read me and build from source with mvn clean install


che.bat start and tomcat is started.

http://localhost:8080/ide ( please note localhost:8080 won't open any thing)


Tuesday, January 19, 2016

cordova not found

By default your node modules will be installed under the user folder and the path will not be registered with the windows PATH variable.

So add the path to the path variable and run the cordova example.

its not the case with the OOB node modules , they will be available in the path.

It got me confused for a while,

Monday, January 18, 2016

install custom apk to android emulator

if you have got an apk out of phonegap and you are wondering how to test it on android device.

export the apk from the build.phonegap.com and run the below command from android studio.

E:\sdk_android\platform-tools>adb.exe install "hello-debug.apk"

find mysql port

go to bin 
mysql.exe 

 SHOW GLOBAL VARIABLES LIKE 'PORT';

Friday, January 15, 2016

Garbage Collection and JVM tuning

To tune jvm you might need to look at the heap size and how it is growing.

You might have to look at how objects are moving different areas of heap 

from EDEN to s0 - s1 to old generation.

A very cool tool you can get from jvisualvm located in jdk/bin

get the tool up and running and install a plugin which says Visual GC which will give you 
realtime information about the heap.

check pictures..


TO cd to a folder in windows using wild characters

cd  e:\bea\jdk150~1\bin

 will take to you whatever is there after 0 and 1 e.g >cd  e:\bea\jdk150_10\bin\java

lol.

Thursday, January 14, 2016

export display from a unix system to windows

Download MochaX server and run it on windows.
Unix prompt $ export DISPLAY=XXXX:0
try xclock - if you see a clock the display is exported.

Now run your program and your display will be exported to the windows.

Analyze the heap captured from jvisualvm

Get a heap dump and run the oql console.
you will find some sample queries on the right hand side.

Create your own custom query like this

select s from java.lang.String s where s.toString().startsWith("userName")
if your code base has this string object it will come in the query results and 
from there you can find the references of the objects in the object tree.

Tuesday, January 5, 2016

Create ant build on a demo project

Download ant zip from apache.org

Create a project - with java code in src directory
put the below xml as build.xml in same directory.

Run the ant from command line as 
>ant compile jar run

if you want to specify a special build file you can do so with 

> ant -buildfile build.xml compile jar run

<project>


   <target name="clean">
       <delete dir="build"/>
   </target>


   <target name="compile">
       <mkdir dir="build/classes"/>
       <javac srcdir="src" destdir="build/classes"/>
   </target>


   <target name="jar">
       <mkdir dir="build/jar"/>
       <jar destfile="build/jar/HelloWorld.jar" basedir="build/classes">
           <manifest>
               <attribute name="Main-Class" value="javatest.JavaTest"/>
           </manifest>
       </jar>
   </target>


   <target name="run">
       <java jar="build/jar/HelloWorld.jar" fork="true"/>
   </target>

</project>

How to get npm running behind a corporate network - using proxy

E:\Tools\nodejs>npm config set proxy http://proxy:8080


E:\Tools\nodejs>npm config set https-proxy http://proxy:8080

Create a war file from jar command


jar cvf xxxx.war *    // navigate inside folder and run it

* will include all the files


Monday, January 4, 2016

Find Eclipse Version

How to find the eclipse version ?


Go to Help --> About Eclipse.

find the icon which says eclipse.org  and click on it.

In the details section check the feature name as Eclipse Platform --> Check the version in the bottom
section








In this case 3.7 is the Eclipse version.