Showing posts with label eclipse. Show all posts
Showing posts with label eclipse. Show all posts

Saturday, 18 August 2018

scala object hello world eclipse example

scala hello world eclipse

object HelloWorldScala {
  def main(args: Array[String]) {
    println("Hello Scala !!")
  }
}

output will be as like bellow

Hello Scala !!


Saturday, 12 April 2014

Fixed How to split a String by space or whitespace

Fixed How to split a String by space or white space

/*
 *
 */
public class SplitByWhitespace {

    /**
     * @param args
        public static void main(String[] args) {
       
        String  str = "How to split a String by space";
        String[] splited = str.split("\\s+");
        for(String splitedValue : splited){
        System.out.println("splitedValue :"+splitedValue);
        }
    }
}
/* Result
 *
 * splitedValue :How
splitedValue :to
splitedValue :split
splitedValue :a
splitedValue :String
splitedValue :by
splitedValue :space
 */

Monday, 16 December 2013

add comment block to methods in Eclipse

How to add comment block to methods in Eclipse..


Source -> Generate element comment

 

/**

*

*comment

*

*/

public void tets(){

 

}

Sunday, 15 December 2013

An internal error occurred during: "Importing Maven projects". Unsupported IClasspathEntry kind=4 fixed

You might have used this command "mvn install" and then you have imported this project in to the eclipse.

 to solve this

 1)Right-click on your project, select Maven -> Remove Maven Nature.
 2)Open you terminal, go to your project folder and do “mvn eclipse:clean”
 3)Right click on your Project and select “Configure -> Convert into Maven Project” This is the error to solve this use above steps.









string-pattern-matched-in-java.html

Friday, 18 October 2013

string split by space in java

How to split a String by space

str = "Hello I'm your String Hello";

String[] splited = str.split("\\s+");

string-pattern-matched-in-java

Monday, 30 September 2013

Eclipse is running in a JRE, but a JDK is required fixed

Eclipse is running in a JRE, but a JDK is required To resolve this issue i added following this line into eclipse.ini.

-vm
C:\JavaJDK\Java\jdk1.6.0_01\jre\bin\client\jvm.dll

Here is the ini file in full;

-startup
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-product
org.eclipse.epp.package.jee.product
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vm
C:\JavaJDK\Java\jdk1.6.0_01\jre\bin\client\jvm.dll
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m