Showing posts with label Eclipse. Show all posts
Showing posts with label Eclipse. Show all posts

Thursday, February 1, 2018

Eclipse Project Import

  1. When we download any eclipse projects from web, follow below steps to import the same into eclipse:
    • extract the downloaded archive into a location: for example: D:\examples\
    • Now, the extracted version of the project looks like this: D:\exmaples\SpringMVCExample
    • In Eclipse, Right click in Projects Explorer -> Import -> Existing Projects Into Workspace -> Browse -> D:\examples\ (enter) 
    • It will list 'SpringMVCExample' as a project for import

Friday, October 5, 2012

eclipse keyboard shortcuts

Press Ctrl+Shift+L for the list of shortcuts, we can then press Ctrl+Shift+L again to get taken us straight to the 'General/Keys' section of Windows/Preferences i.e. Press Ctrl+Shift+L twice.

Ctrl + Alt + Down arrow: copies current line or selected lines to below

Ctrl + Alt + Up arrow: copies current line or selected lines to above

To escape text when pasting into a String literal automatically:
Go to Window -> Preferences -> Java -> Editor -> Typing
The following window will be displayed:



Check "Escape text when pasting into a string literal" option as shown in the above image.

Use of above trick: Assume, we are pasting absolute path to a file on Windows.
Example: C:\folder1\folder2\file.txt
With the above trick while pasting the above path into a String literal it becomes
"C:\\folder1\\floder2\\file.txt"

Thursday, August 16, 2012

eclipse.ini

Eclipse startup is controlled by the options in $ECLIPSE_HOME/eclipse.ini. If $ECLIPSE_HOME is not defined, the default eclipse.ini in your Eclipse installation directory is used.

eclipse.ini is a text file containing command-line options that are added to the command line used when Eclipse is started up.

Specifying the JVM:
- The -vm option and its value (the path) must be on separate lines.
- The value must be the full absolute or relative path to the Java executable, not just to the Java home
   directory.
- The -vm option must occur before the -vmargs option, since everything after -vmargs is passed directly to
   the JVM.

Example:
-vm
C:\Java\JDK\1.6\bin\javaw.exe