Problem Using Native Swing Package in Java

Asked By 230 points N/A Posted on -


Is there any programmer who can solve my  issue?  I am getting the error while developing an application in java. I am trying to build an application which opens a site (Flash Based) and enters some search terms on the site and gets result of the query.

I thought over this and started building an web browser capable of handling flash as well. I searched over Google and came across dj native swing library for java.

I imported the library and also write some codes. But whenever I am trying to import WebBrowser package its showing me error of package not found and suggesting me to create new class named WebBrowser.Java.

All environment variables are also configured, but i am having difficulty in importing only this package.

I also tried importing this package in eclipse and tested example file of djnativeswing for web browser and its compiling successfully in eclipse, but i am getting this error only in net beans.

I am using Net Beans latest version.

Java sdk 6.


Best Answer by amtranslate
Best Answer
Best Answer
Answered By 0 points N/A #105167

Problem Using Native Swing Package in Java


Take These Steps and Follow

Download the appropriate version depending on what language(s) you want to develop in. you choose Java.

Download the file and save it to your home directory, /home/your username.

  • First:-

Install net beans:

cd $HOME
sudo sh ./
  • Second:-

Create a script to run net beans (skip this if you want to invoke it from Applications > Programming > Net Beans IDE 6.5 in the Ubuntu menu bar):

cd $HOME
mkdir bin
cd bin
# Create a file called netbeans in the current dir and make its contents exactly as
# follows in the next two lines and then save it and then quit your editor:
# Make it executable
chmod u+x netbeans
# Put this in your path for this shell session
# (add this line to your .bashrc or .zshrc file in /home/yourusername
#  to see the path in all future shells; be sure to exit the shell to see the changes though)
export PATH=/home/yourusername/bin:$PATH
# Run NetBeans!

Alternatively, you can just add /usr/local/netbeans-6.5/bin to your PATH, or you can run the following if you don't even want to mess with your PATH:

ln -s /usr/local/netbeans-6.5/bin/netbeans /usr/local/bin/netbeans

*  If you have Missing Java:

If the installer fails or cannot find the Java JDK, try

which java
which javac

If those both return values, perhaps the installer missed them and you can browse for them manually yourself in the installer. If one of those does not return a value, you need to install Java:

sudo apt-get install sun-java6-bin sun-java6-jdk


Answered By 0 points N/A #105168

Problem Using Native Swing Package in Java

Hello Carolyn,
The DJ Native Swing packages the integration on some native components into swing applications. However, the main focus is the integration of a native Web Browser and Flash Player using a Swing-like API. Nevertheless, it also offers other useful components like a multimedia player (based on VLC), an HTML editor (using FCKeditor or TinyMCE) and a Syntax Highlighter.
All the threading issues and general integration headaches are handled automatically. It also allows to mix lightweight and heavyweight components without major visual problems. The Webstart demo is configured to work on Windows. It also works on Linux (GTK, x86/i386) a 32 bit where XULRunner is installed. It also uses SWT under the hood, and thus should work everywhere SWT allows to be placed inside a Swing component.
I will give you a link for further information if my solutions isn't satisfiable to your question:
To get the web browser to work on Linux, follow the FAQ on SWT's website (XULRunner may be required).
DJ Native Swing is licensed under LGPL and requires Java 5 or later.

Login/Register to Answer

Related Questions