Tuesday, July 23, 2013

Eclipse 4.3: No schema found for the extension point


No schema found for the extension point. The warning occurred in "Extensions" tab of plugin.xml file. Look at the following screenshot:

Tuesday, July 16, 2013

Eclipse: Internal browser is not available: No more handles [Unknown Mozilla path (MOZILLA_FIVE_HOME not set)]

PROBLEM: I've got the following error message when was configuring Eclipse after installing a new Fedora 19:

Unhandled event loop exception
org.eclipse.swt.SWTError: No more handles [Unknown Mozilla path (MOZILLA_FIVE_HOME not set)]
at org.eclipse.swt.SWT.error(SWT.java:4423)
at org.eclipse.swt.browser.Mozilla.initMozilla(Mozilla.java:1993)
at org.eclipse.swt.browser.Mozilla.create(Mozilla.java:701)
at org.eclipse.swt.browser.Browser.<init>(Browser.java:99)

SOLUTION: The solution was just install missed lib and restart Eclipse:

1. $ sudo yum install libwebkitgtk*
2. Restart Eclipse

Saturday, July 13, 2013

Fedora 19 (64-bit) - Installation notes

1. Install Chrome

$ sudo nano /etc/yum.repos.d/google-chrome.repo

name=google-chrome - 64-bit

$ sudo yum install google-chrome-stable

2. Install gnome-tweeak-tool and customize it

$ sudo yum install gnome-tweak-tool

To run it, press Alt+F2 and type in 'gnome-tweak-tool'. Simple selecting the options performs the changes.

3. Add "Open Terminal" to Gnome Context Menu

$ sudo yum install nautilus-open-terminal

4. Install rpmFusion reposetory

$ sudo yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm

Friday, June 14, 2013

FreeMarker: An open alternative to JSP

Today I read a good article about FreeMarker - an alternative to JSP: http://www.javaworld.com/jw-01-2001/jw-0119-freemarker.html?page=1

Some notes about performance which I were looking for:

- Much like JSP, FreeMarker compiles templates to improve runtime performance. Those templates are stored in memory in a format that leaves placeholders for dynamic data. The controller fills those placeholders with dynamic data from the model. For this purpose, the controller must have access to both the model and the view. Once the dynamic data is retrieved from the model, the controller will print the template to a given output stream.
- Once templates are compiled, you can process them in parallel, leading to a significant performance boost.

- For anything other than the most trivial projects, FreeMarker provides a TemplateCache interface, implementations of which act as a repository for precompiled templates.

- An additional feature of TemplateCache objects is that they automatically reload templates when the template source file has changed. That relieves you of having to start and stop the servlet engine when you need to make changes to the HTML.

JSP versus FreeMarker (official documentation): http://freemarker.sourceforge.net/docs/app_faq.html#faq_jsp_vs_freemarker

Wednesday, June 5, 2013

Debugging JavaScript in Chrome

Let's have test.html:

   <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
   <script type="text/javascript" src="fun.js"></script>
   <button onclick="return simpleFunction();">Click me</button>
   <ul id="testId"></ul>

and fun.js:

function simpleFunction() {
  for (var i=0; i < 7; i++) {
   var html = '<li>' + i + '</li>';
  return false;

Wednesday, May 22, 2013

Unsupported major.minor version 51.0

Today I faced with the following exception:

java.lang.UnsupportedClassVersionError: com/rdiachenko/blackbox/alg/InsertionSortTest : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClass(RemoteTestRunner.java:693)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClasses(RemoteTestRunner.java:429)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

Reason: Java sources were compiled with JDK 7, but were running on the lower JDK 6.
Solution: use higher (or the same) JDK during runtime and lower (or the same) during compile time.

Verstion 51.0 in exception message means J2SE 7. Here the list of all versions: http://en.wikipedia.org/wiki/Java_class_file

Wednesday, May 15, 2013

JavaScript plugin for Eclipse

Found a nice plugin for Eclipse which provides a pretty handy work with JavaScript - VJET.

VJET JavaScript IDE is an Eclipse plugin that provides a fully integrated development environment for JavaScript. Its main features:

- Code Assistance
- Code Search
- Syntax and Semantic Checking
- Type Declarations using VJETDoc
- Execution/Debugging

The project's site is here: http://www.eclipse.org/vjet/
The update site is here: http://www.eclipse.org/vjet/download/

Install and run Windows applications on Fedora/Ubuntu

PlayOnLinux is a tool which allows to install/run Windows applications under Linux. It is a kind of shell for wine.

Installation for Fedora:

$ wget http://rpm.playonlinux.com/playonlinux.repo
$ sudo cp  playonlinux.repo /etc/yum.repos.d/
$ sudo yum install playonlinux

Installation for Ubuntu here

Thursday, February 28, 2013

SSH log-in without entering the password

1. If you have no public and private ssh keys run the following command and press Enter for all the input requests:

$ ssh-keygen

2. Copy your public key to the remote server you want to log-in to via ssh without entering the password:

$ ssh-copy-id -i ~/.ssh/id_rsa.pub username@remote_host

3. Try to log-in to the server without entering the password:

$ ssh username@remote_host