Tag Archives: netbeans

QT Application with Java. Possible? Yes QT Jambi does it.

If you’ve never heard about it, you can build rich cross-platform GUIs with Qt Jambi., while coding in Java. What?
Yes, QT Jambi is a QT Binding to Java, allowing you to develop QT GUI using Java instead of C++.
It practically is the same thing as Java-Gnome library which is a GTK+ binding.

QT Jambi is still maintained as opposite to rumors. And the last snapshot was build on 11 November 2012.
If you want to give it a shot, the following is a ‘get started’ tuto:

Environment:

  • OS: Ubuntu 12.10 AMD64
  • Desktop: Unity
  • IDE 1: Netbeans 7.3
  • JDK: Oracle JDK 1.7.u10
  • IDE 2: Eclipse Juno

First, install Qt Jambi from its PPA:


sudo add-apt-repository ppa:qtjambi-community/libqtjambi-snapshots && sudo apt-get update && sudo apt-get install --install-suggests libqtjambi-snapshot qtjambi-examples-snapshot qtjambi-designer-snapshot ant-qtjambi-snapshot libqtjambi-redist-snapshot

Then, use this script, to tell your JDK where to find corresponding QT libraries used by QT Jambi:

#!/bin/bash

#| Title: CopyJambi
#| Author: Hanine HAMZIOUI
#| Contact: <hanynowsky@gmail.com>
#| Date:  Sat 15 Dec 2012 03:57:00 AM WET
#| License: GNU GPL v3+
#| Description: Create symlinks to QT libs in default JDK for Jambi.
#| Version: 1.0
#| Environment: Netbeans 7.3 on Ubuntu 12.10 AMD64
#| Compliance: bash, zsh, ksh, dash, sh

# sudo add-apt-repository ppa:qtjambi-community/libqtjambi-snapshots
# sudo apt-get update
#sudo apt-get install --install-suggests libqtjambi-snapshot qtjambi-examples-snapshot qtjambi-designer-snapshot ant-qtjambi-snapshot libqtjambi-redist-snapshot

OPERATION() {
# Pick the JDK path
if [ -n "${JAVA_HOME}" ]; then jdk=${JAVA_HOME}
else
    if [ -d "/usr/lib/jvm/default-java" ]; then jdk=/usr/lib/jvm/default-java
    else whiptail --msgbox "No JAVA_HOME was found. Script will abort." "$LINES" "$COLUMNS"; exit 0
    fi
fi

# Two Temporary files that receive names of libraries to be copied
tmp1=$HOME/tmp/qtlibslist.txt
tmp2=$HOME/tmp/qtjnilibslist.txt

# Get the names of libraries to be copied
ls /usr/lib/x86_64-linux-gnu/ | grep libQt | sed -e '/.prl$/g' -e '/.a$/g' -e '/[0-9].[0-9]$/g' | perl -ne 's/^$//g || print' > ${tmp1}
ls /usr/lib/x86_64-linux-gnu/ | tr '[:upper:]' '[:lower:]' | grep libqt | sed -e '/.prl$/g' -e '/.a$/g' -e '/[0-9].[0-9]$/g' | perl -ne 's/^$//g || print' >> ${tmp1}
ls /usr/lib/jni |  tr '[:upper:]' '[:lower:]' | grep trolltech > ${tmp2}
ls /usr/lib/jni |  tr '[:upper:]' '[:lower:]' | grep jambi >> ${tmp2}

# Create symbolic links to QT libraries
count=0
while read line; do
sudo ln -v -s /usr/lib/x86_64-linux-gnu/${line} /usr/lib/${line}
sudo ln -v -s /usr/lib/x86_64-linux-gnu/${line} ${jdk}/jre/lib/amd64/${line}
((count++))
done < ${tmp1}
echo "Copied ${count} QT libraries Symbolic links"

# Create symbolic links to Jambi Libraries
i=0
while read inline; do
sudo ln -v -s /usr/lib/jni/${inline} ${jdk}/jre/lib/amd64/${inline}
sudo ln -s -v /usr/lib/jni/${inline} /usr/lib/${inline}
((count++))
done < ${tmp2}
echo "Copied ${i} Jambi QT libraries Symbolic links"

# Remove temporary files
if [ -f ${tmp1} ] || [ -f ${tmp2} ]
    then rm -v ${tmp1}; rm -v ${tmp2}
fi
}

# Make sure the user system is amd64
arch=$(uname -i)
if [ "${arch}" = "x86_64" ]; then eval OPERATION
else whiptail --msgbox "Your system architecture is not AMD64. Script will not continue. Abort." "$LINES" "$COLUMNS"
fi
exit 0

The above script will create symbolic links in your JDK path. If you want you can copy the libraries instead of just symlinking them.

Next step is to create a Java Project in Netbeans and import Qt Jambi library in classpath as well as QT Jambi Demos library. (You’ll find them in /usr/share/java/)

jambi-netbeans

Here is a screenshot of a demo example :

Jambi-Example

You can test with a simpler example (Hello World):


package jambi;

import com.trolltech.qt.gui.*;

public class HellowWorld {

public static void main(String args[]) {
QApplication.initialize(args);
QPushButton hello = new QPushButton("Hello World!");
hello.resize(120, 40);
hello.setWindowTitle("Hello World");
hello.show();
QApplication.execStatic();
QApplication.shutdown();
}
}

Notice:

When running a QT Jambi java file, you might encounter this error :
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f6b95e362ba, pid=10602, tid=140100171314944
#
# JRE version: 7.0_10-b18
# Java VM: Java HotSpot(TM) 64-Bit Server VM (23.6-b04 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [libQtGui.so.4+0x2602ba] QWidgetPrivate::deleteTLSysExtra()+0x3a
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/hanine/Workspace/test/jambi/hs_err_pid10602.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp

Yet, entering : ulimit -c unlimited does not help at all. It sounds like an old bug related to Java HotSpot, where a zip file is read and modified in the same time. In other situations this bug is overriden using -Xmx option (e.g. -Xmx2900m : Maximum Memory : 2.9 GB )
E.G: java -Xmx:1864m -Xms:1864m myapp.jar sets minimum & maximum java memory heaps to 1864 MB for myapp.jar.
So, it appears that in almost all cases, a java file with the following statements will produce this error:

 public static void main(String args[]) {
        QApplication.initialize(args);

        Wiggly d = new Wiggly(null);
        d.show();

        QApplication.execStatic();
        QApplication.shutdown();
    }

So to get rid of this error, change the code to look like this instead (Still investigating on the root problem though):

 public static void main(String args[]) {
        QApplication.initialize(args);
        new Wiggly(null).show();

        QApplication.execStatic();
        QApplication.shutdown();
    }

Running your Qt Application from terminal

When you clean and build with Netbeans, you’d get a Jar File in your project workspace, in a folder named dist.
Make this jar file executable : chmod +x /path/to/this/jar/file.jar
and run it from terminal: java -jar /path/to/this/jar/file.jar

Qt Application executed as a JAR file.

Qt Application executed as a JAR file.

Eclipse Juno IDE

You can achieve the same thing using Eclipse if it’s your preferred IDE. Just make sure you install qt-jambi from Launchpad PPA and run the above script:

  • – Use the script from above or just download it from here : QtJambiCopierSCript
  • – Save it in your Desktop and run : bash ~/Desktop/jambicopy.sh
  • – Follow instructions if any.
  • – Open Eclipse Juno, Create a Java Project and add external libraries from /usr/share/java/
  • – Adding the qtjambi.jar and qtjambi-examples.jar does the job.

jambi-eclipse

GUI Designer

Unlike Java-Gnome binding library which does not yet integrate with GUI designer GLADE, Qt Jambi integrates with QT Designer.
If you followed instructions above, go to your Terminal and type:

qtjambi-designer.sh

or

bash /usr/bin/qtjambi-designer.sh

This will launch QT Jambi Designer. Henceforth, you can start designing visually your GUI. Once finished, save the work as a "*.jui" file, which you would reuse as your Application UI.
Normally, Qt Designer produces a file with "*.ui" extension; but QT Jambi team has modified the thing with custom modifications that allow better integration and generation of UI java files.
qtjambi-designer
We will cover this later in this same post.
Thanks for reading.
—————
N.B: Qt Jambi Community website is down since yesterday (14th December).
You can browse other useful resources that will get you accustomed to QT Jambi quickly: QT JAMBI RESOURCES

Integration of Java Swing Applications with Unity Global Menu in Ubuntu 12.04

Java Swing Ayatana – Ubuntu Global Menu Support

Thanks to the new Project named Java Ayatana (Initiated by Jared Gonzales), Java Swing applications developers can now add support for Ubuntu Unity Global menu integration and Unity Launcher (Only one instance of Netbeans entry will be allowed in the Launcher and will persist despite logout or reboot).

All you have to do is import the Java Ayatana Library to your Java project CLASSPATH and call it in your Main JFrame object Class.

Java Ayatana Library in Classpath (Netbeans)

Java Ayatana Library in Classpath (Netbeans)

/**
* It is necessary for javax.swing.JFrame to
* include a menu bar javax.swing.JMenuBar object.
*/
import javax.swing. *;
 import org.java.ayatana.ApplicationMenu;

 public class Window extends JFrame {
public Window () {
/ / Setup window ...
// Check if Ayatana Desktop is supported
ApplicationMenu.tryInstall (this);
}
 }
  • Here is a JFrame example that you can use to test Java Ayatana:

package swingtest;

import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
import org.java.ayatana.ApplicationMenu;

/**
* Java Ayatana: Java Swing Global Menu Support in Ubuntu
*
* @author Hanynowsky
*/
public class MenuBarExample extends JFrame {

/**
* Constructor
*/
public MenuBarExample() {

// Components
String s = "I am a basic example of Java Swing Menu Bar"
+ " that uses Java Ayatana Library: Java Swing Support for Unity "
+ "GLobal Menu in Ubuntu";
final JTextPane textarea = new JTextPane();
Font font = new Font("Liberation Mono", Font.PLAIN, 14);
textarea.setFont(font);
textarea.setText(s);
//textarea.
getContentPane().add(textarea);
setTitle("MenuBarExample");
setSize(500, 350);
JMenuBar menuBar = new JMenuBar();
setJMenuBar(menuBar);
JMenu fileMenu = new JMenu("File");
JMenu editMenu = new JMenu("Edit");
JMenu viewMenu = new JMenu("View");
menuBar.add(fileMenu);
menuBar.add(editMenu);
menuBar.add(viewMenu);
JMenuItem newAction = new JMenuItem("New");
JMenuItem openAction = new JMenuItem("Open");
openAction.setEnabled(false);
JMenuItem exitAction = new JMenuItem("Exit");
JMenuItem cutAction = new JMenuItem("Cut");
cutAction.setEnabled(false);
JMenuItem copyAction = new JMenuItem("Copy");
copyAction.setEnabled(false);
JMenuItem pasteAction = new JMenuItem("Paste");
pasteAction.setEnabled(false);
JMenuItem toolbarsAction = new JMenuItem("toolbarsAction");
fileMenu.add(newAction);
fileMenu.add(openAction);
fileMenu.addSeparator();
fileMenu.add(exitAction);
editMenu.add(cutAction);
editMenu.add(copyAction);
editMenu.add(pasteAction);
editMenu.addSeparator();
viewMenu.add(toolbarsAction);
exitAction.addActionListener(new ActionListener() {

@Override
public void actionPerformed(ActionEvent e) {
System.exit(0);
}
});
newAction.addActionListener(new ActionListener() {

@Override
public void actionPerformed(ActionEvent e) {
System.out.println("You clicked on the new action");
textarea.setText("What did you expect by clicking me! A new cake?");
}
});
}

/**
* Main Method
*
* @param args
*/
public static void main(String[] args) {
MenuBarExample mba = new MenuBarExample();
mba.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
mba.setVisible(true);
// Java Ayatana Call
if (AyatanaDesktop.isSupported())
{ ApplicationMenu.tryInstall(mba);}
}
}

  • And the result is this:
Global Menu Support in Java Swing (Java Ayatana)

Global Menu Support in Java Swing (Java Ayatana)

And HUD:

HUD Integration

HUD Integration


NetBeans IDE 7.1.2 Support

: Global Menu & Unity Launcher

Let’s also note that the same library is used into a NBM plugin for Netbeans IDE, updated for version 7.1.2. You can get the plugin in Java Swing Ayatana google code repository.

Open your Netbeans IDE, then: Options / Plugins. And add the downloaded plugin and then install it (Restart NetBeans). You can also install it using the catalog XML file retrieved from : http://java-swing-ayatana.googlecode.com/files/netbeans-catalog.xml

After Installation, if the plugin does not work, Go to : /home/yourUserName/.local/share/applications/

and check if there is a file : netbeans-7.1.2.desktop

Open it with your text editor (ex: gedit). It should be similar to this.


[Desktop Entry]
Name=Netbeans
Exec=netbeans
Icon=netbeans
Categories=Application;Development;Java;IDE
StartupWMClass=netbeans-7.1.2
StartupNotify=true
Terminal=false
Type=Application

N.B: The property ‘Exec=netbeans‘ assumes that you are already able to run NetBeans in Terminal using the command : netbeans instead of the whole path to netbeans executable.
Finally, drag the same file to your Unity Launcher, if not yet done.

Netbeans Integrtion with Ubuntu Unity Global Menu & Launcher

Netbeans Integrtion with Ubuntu Unity Global Menu & Launcher

Netbeans Integrtion with Ubuntu Unity HUD

Netbeans Integrtion with Ubuntu Unity HUD

—————————————————

SOLUTION 2 :  JRE endorsed.

Today, you can set your default JRE (Java Runtime Environment) (Oracle JRE or OpenJDK JRE) to call Jayatana whenever the VM is run by  a swing application.

You no more need to import the Jayatana library into your Swing project classpath. Now, execute your swing application in ubuntu and it’s automatically integrated with Global Menus.

What to do?

Depending on your JDK of choice, here are the appropriate steps to follow:

OpenJDK JDK 7:

On Terminal enter, one comand by one:

Switch to your home directory:

cd ~/

Install the required packages

sudo apt-get install openjdk-7-jdk libunity-dev libxt-dev gcc make ant subversion

Update Java alternatives (set OpenJDK as default)

sudo update-java-alternatives -s java-1.7.0-openjdk-amd64

Use Subversion to checkout Jayatana source code (this will copy the library source code to your home folder).

svn checkout http://java-swing-ayatana.googlecode.com/svn/tags/1.2.4/jayatana

switch to the newly created folder (/jayatana)

cd ~/jayatana

Use ANT to unbuild the project if already built.

sudo ant deinstall

Use ANT to build and configurate the project

sudo ant install
sudo ant config

ORACLE JDK 7

sudo apt-get install openjdk-7-jdk libunity-dev libxt-dev gcc make ant subversion
svn checkout http://java-swing-ayatana.googlecode.com/svn/tags/1.2.4/jayatana
cd ~/jayatana
sudo ant deinstall
sudo ant install -Djava.home.7=/usr/lib/jvm/oraclejdk7
sudo ant config -Djava.home.7=/usr/lib/jvm/oraclejdk7

Where /usr/lib/jvm/oraclejdk7 is your JDK_7 home directory.

The following screenshot illustrates Intellij IDEA Global menu integration in Ubuntu 12.10 using SOLUTION 2.

intellij-idea

IntellijIDea111_Ubuntu

IntellijIDea111_Ubuntu

Semi-Automatic Installation

If you want to automate the Jayatana installation, you can use or download this script below as follows:
– Copy/Paste the script content in a file and name it : install-jayatana.sh
– Save the file in your Desktop folder.
– go to Terminal and type: sh ~/Desktop/install-jayatana.sh– Follow instructions.
– Later on, if you want to uninstall Jayatana, use the same script again.

#!/bin/bash

# ----------------------------------------------
# Author: hanynowsky@gmail.com
# Before executing this script make sure 
# you're in your home directory `cd $HOME`
#--------------------------------------------------

# -------------------------------------NOTICE------------
# APPLICABLE ONLY IN UBUNTU UNITY 
# This script installs Jayatana for your JDKs 
# It supposes you already have set your JAVA_HOME in ~/.bashrc
# You will be prompted to choose which JDK to set as Default 
# (choose the corresponding index).
# In case you already installed jayatana and want to re-install, 
# please uninstall then install again.
# ------------------------------------------------------

# -------------------------------------LICENSE--------------------
#Licensed under the GNU LGPL, Version 3.0 (the "License");
# you may not use this file except in compliance with the License
# ----------------------------------------------------------------

#JDKPATH=`echo $JAVA_HOME | sed -e 's/bash://g' | sed -e 's/Is a directory//g'`
#JDKPATH=eval "echo $JAVA_HOME"
JDKPATH=`echo $JAVA_HOME | grep [^*]`
USERHOME=`echo $HOME`
JAYATANADD="http://java-swing-ayatana.googlecode.com/svn/tags/1.2.4/jayatana"

# INSTALL 
INSTALLCOM () {
sudo apt-get -y install openjdk-7-jdk libunity-dev libxt-dev gcc make ant subversion 
sudo update-java-alternatives -s java-1.7.0-openjdk-amd64 
svn checkout $JAYATANADD 
sudo ant install -buildfile $USERHOME/jayatana/build.xml -v
sudo ant config -v 
sudo update-alternatives --config java 
sudo update-alternatives --config javac
sudo ant install -Djava.home.7=/usr/lib/jvm/java-7-openjdk-amd64 -f $USERHOME/jayatana/build.xml -v -l $USERHOME/Desktop/jayatana-stall.log
sudo ant config -Djava.home.7=$JDKPATH -f ~/jayatana/build.xml -v -l $USERHOME/Desktop/jayatana-stall.log
}

# UNINSTALL
UNINSTALLCOM (){
sudo ant deinstall -buildfile $USERHOME/jayatana/build.xml -v
sudo ant deconfig -buildfile $USERHOME/jayatana/build.xml -v
sudo ant deconfig -Djava.home.7=$JDKPATH -f $USERHOME/jayatana/build.xml -v -l $USERHOME/Desktop/jayatana-stall.log
}

# DELETE Jayatana Folder created by subversion checkout
UNDIR() {
read -p "Delete Jayatana Folder too? Enter ( y ) to delete or ( n ) otherwise : " choice
if [ "$choice" = "y" ]; then mv $HOME/jayatana $HOME/.local/share/Trash/files/
elif [ "$option" = "n" ]; then echo"Jayatana Folder is kept by $USER";
echo "you can delete it later : ~/jayatana";
else echo "Jayatana Folder is kept by $USER , you can delete it later : ~/jayatana";
fi
}

# COMMON
COMMON() {
echo "$JDKPATH : is your default JDK. Version: " 
echo `java -version`
}
eval COMMON;
read -p "Enter ( i ) to install or ( u ) to uninstall : " option
if [ "$option" = "i" ]; then eval INSTALLCOM
elif [ "$option" = "u" ]; then eval UNINSTALLCOM;eval UNDIR;
else echo "Aborted by $USER";
fi
exit 0;

DRAWBACKS

  • Netbeans IDE: You will lose launcher icon consistency (Unless you install jayatana netbeans plugin jayatana.nbm).
  • Oracle JDeveloper 11g R2: No integration yet. Still a mystery.
  • HUD: In order to benefit from Unity HUD for Java Swing applications, you need to manually create a myjavaapp.desktop file and put it in ~/.local/share/applications/

e.g:

[Desktop Entry]
Exec=java -jar /home/myusername/mySwingApp/mySwingApplication.jar
Terminal=false
Type=Application
StartupNotify=true
Categories=Java;Science
Icon=/home/myusername/mySwingApp/mySwingApp.png
Name=MySwingApp 1.2

MANUALLY UNINSTALL IF YOU WANT

For Open JDK :
cd ~/jayatana && sudo ant deinstall && sudo ant deconfig
for Oracle JDK:
cd ~/jayatana && sudo ant deinstall && sudo deconfig -Djava.home.7=ORACLE_JAVA_HOME_7
where ORACLE_JAVA_HOME_ is your JDK home directory (most likely /usr/lib/jvm/myjdk7)

Oracle Sun JDK 7 : Derby Server (Java DB) does not start using Glassfish 3.1.2 in Netbeans 7.1.2: Permission denied

Apache Derby

Apache Derby

Assuming you’re using JDK 7 in Linux (Here Ubuntu 12.04 LTS), when deploying a web application on Glassfish 3.1.2 using Netbeans 7.1.2, Derby might likely not start and get ready to receive connections, and this due to an exception thrown (JDK 7 security).
which is:

Caused by: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "file.encoding" "read")

You can for now append this permission below to the java policy file that is shipped with JDK 1.7.:
permission java.util.PropertyPermission "file.encoding", "read";

The file should like this:

// Standard extensions get all permissions by default

grant codeBase "file:${{java.ext.dirs}}/*" {
permission java.security.AllPermission;
};

// default permissions granted to all domains

grant {
// Allows any thread to stop itself using the java.lang.Thread.stop()
// method that takes no argument.
// Note that this permission is granted by default only to remain
// backwards compatible.
// It is strongly recommended that you either remove this permission
// from this policy file or further restrict it to code sources
// that you specify, because Thread.stop() is potentially unsafe.
// See the API specification of java.lang.Thread.stop() for more
// information.
permission java.lang.RuntimePermission "stopThread";

// allows anyone to listen on un-privileged ports
permission java.net.SocketPermission "localhost:1024-", "listen";

// "standard" properies that can be read by anyone

permission java.util.PropertyPermission "java.version", "read";
permission java.util.PropertyPermission "java.vendor", "read";
permission java.util.PropertyPermission "java.vendor.url", "read";
permission java.util.PropertyPermission "java.class.version", "read";
permission java.util.PropertyPermission "os.name", "read";
permission java.util.PropertyPermission "os.version", "read";
permission java.util.PropertyPermission "os.arch", "read";
permission java.util.PropertyPermission "file.separator", "read";
permission java.util.PropertyPermission "path.separator", "read";
permission java.util.PropertyPermission "line.separator", "read";

permission java.util.PropertyPermission "java.specification.version", "read";
permission java.util.PropertyPermission "java.specification.vendor", "read";
permission java.util.PropertyPermission "java.specification.name", "read";

permission java.util.PropertyPermission "java.vm.specification.version", "read";
permission java.util.PropertyPermission "java.vm.specification.vendor", "read";
permission java.util.PropertyPermission "java.vm.specification.name", "read";
permission java.util.PropertyPermission "java.vm.version", "read";
permission java.util.PropertyPermission "java.vm.vendor", "read";
permission java.util.PropertyPermission "java.vm.name", "read";
permission java.util.PropertyPermission "file.encoding", "read";
};

N.B: The file is found here in our case /usr/lib/jvm/jdk1.7.0/jre/lib/security/java.policy

More info: http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=%2Fcom.ibm.websphere.base.doc%2Finfo%2Faes%2Fae%2Frsec_javapolicy.html

Add an Entry for Netbeans IDE in Ubuntu 12.04 Unity Launcher


Supposing you installed Netbeans in your Ubuntu 12.04 home directory using the downloaded package from netbeans.org, here is for the time being how to add an entry to the launcher for netbeans or any other similar case (Eclipse IDE for example):
Netbeans executable is  : /home/user/netbeans-7.1.2/netbeans

go to folder : /home/user/netbeans-7.1.2/

and create a file named: netbeans.desktop

and append the following:


[Desktop Entry]
Encoding=UTF-8
Name=NetBeans IDE 7.1.2
Comment=The Smarter Way to Code
Exec=/bin/sh "/home/yourusername/netbeans-7.1.2/bin/netbeans"
Icon=/home/yourusername/netbeans-7.1.2/bin/Netbeans-Logo-box.png
Categories=Application;Development;Java;IDE
Version=1.0
Type=Application
Terminal=0

This assumes you have an icon in png format in the same folder.
Save and exit.
Then Drag the newly created file to the Launcher. You’re done.
Here are two PNG icons, one for Netbeans and one for Eclipse:

Eclipse

Eclipse Icon

Netbeans Icon

Netbeans Icon

————————-

You can even add embedded subentries:

Customized Eclipse Entry in Unity Launcher

Customized Eclipse Entry in Unity Launcher

[Desktop Entry]
Encoding=UTF-8
Name=Eclipse
Comment=Eclipse IDE
Exec=/home/hanynowsky/eclipse/eclipse
Icon=/home/hanynowsky/eclipse/eclipse.png
Categories=Application;Programming;Java;IDE;dev
Version=1.0
Type=Application
Terminal=0

X-Ayatana-Desktop-Shortcuts=Java EE;Java Swing;Android;

[Java Swing Shortcut Group]
Name=Java Swing
Exec=/home/hanynowsky/eclipse/eclipse -data /home/hanynowsky/Workspace/swing
TargetEnvironment=Unity

[Java EE Shortcut Group]
Name=Java EE
Exec=/home/hanynowsky/eclipse/eclipse -data /home/hanynwosky/Workspace/javaee
TargetEnvironment=Unity

[Android Shortcut Group]
Name=Android
Exec=/home/hanynowsky/eclipse/eclipse -data /home/hanynowsky/Workspace/android
TargetEnvironment=Unity