Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-28-2010, 06:09 AM   #1
LQ Newbie
Registered: Nov 2010
Posts: 2

Rep: Reputation: 0
Exclamation java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Listener

Linux newbie, but not ignorant. Followed steps to this point, can't get client.jnlp from "" to work.

Here's what I've done so far to make sure java was enable and installed correctly:

sudo apt-get install xubuntu-restricted-extras
sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
accepted the license, completed the install. Every time I try and launch the app from the listed site above, I get an application error with the following data showing:

Launch File

<!DOCTYPE jnlp PUBLIC "-//Sun Microsystems, Inc//DTD JNLP Descriptor 6.0//EN" "">
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="6.0+" version="3812" codebase=""  href="client.jnlp">
		<title>UCentive Client</title>
    	<shortcut online="true">
      		<menu submenu="UCentive" />


	<update check="always" policy="always" />

		<java version="1.6+" initial-heap-size="256M" max-heap-size="1024M" />

		<!-- Client -->
		<jar href="client.jar" />
		<jar href="lib/commons-codec-1.4.jar" />
		<jar href="lib/commons-httpclient-3.1.jar" />
		<jar href="lib/entities-jpa.jar" />
		<jar href="lib/jersey-apache-client-1.1.5.jar" />
		<jar href="lib/jersey-client-1.1.5.jar" />
		<jar href="lib/jersey-core-1.1.5.jar" />
		<jar href="lib/jsr311-api-1.1.jar" />
		<jar href="lib/ucentive-common.jar" />
		<jar href="lib/ucentive-utils.jar" />

		<!-- Reports -->
		<jar href="lib/report/commons-beanutils.jar" />
		<jar href="lib/report/commons-collections.jar" />
		<jar href="lib/report/commons-digester-1.8.jar" />
		<jar href="lib/report/commons-logging.jar" />
		<jar href="lib/report/jasperreports-3.7.4.jar" />
		<jar href="lib/report/JasperReportUtil-client.jar" />
		<jar href="lib/report/report-plugin-client.jar" />


	<resources os="Linux" arch="x86_64">
		<java version="1.6+" />
		<jar href="lib/swt/swt-3.6-gtk-linux-x86_64.jar" />

	<resources os="Linux" arch="amd64">
		<java version="1.6+" />
		<jar href="lib/swt/swt-3.6-gtk-linux-x86_64.jar" />

	<resources os="Linux" arch="x86">
		<java version="1.6+" />
		<jar href="lib/swt/swt-3.6-gtk-linux-x86.jar" />

	<resources os="Mac OS X" arch="x86_64">
		<java version="1.6+" java-vm-args="-XstartOnFirstThread -d64" />
		<jar href="lib/swt/swt-3.6-cocoa-macosx-x86_64.jar" />

	<resources os="Mac OS X" arch="x86">
		<java version="1.6+" java-vm-args="-XstartOnFirstThread -d32" />
		<jar href="lib/swt/swt-3.6-cocoa-macosx.jar" />

	<resources os="Windows" arch="x86_64">
		<java version="1.6+" />
		<jar href="lib/swt/swt-3.6-win32-win32-x86_64.jar" />

	<resources os="Windows" arch="amd64">
		<java version="1.6+" />
		<jar href="lib/swt/swt-3.6-win32-win32-x86_64.jar" />

	<resources os="Windows" arch="x86">
		<java version="1.6+" />
		<jar href="lib/swt/swt-3.6-win32-win32-x86.jar" />

	<application-desc main-class="net.ucentive.client.ClientApp">

java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Listener
	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
	at java.lang.Class.getMethod0(Unknown Source)
	at java.lang.Class.getMethod(Unknown Source)
	at com.sun.javaws.Launcher.executeApplication(
	at com.sun.javaws.Launcher.executeMainClass(
	at com.sun.javaws.Launcher.doLaunchApp(
	at Source)
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.widgets.Listener
	at$ Source)
	at Method)
	at Source)
	at com.sun.jnlp.JNLPClassLoader.findClass(
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 9 more
Java Web Start 1.6.0_21
Using JRE version 1.6.0_22-b04 Java HotSpot(TM) Server VM
User home directory = /home/clayton
c:   clear console window
f:   finalize objects on finalization queue
g:   garbage collect
h:   display this help message
m:   print memory usage
o:   trigger logging
p:   reload proxy configuration
q:   hide console
r:   reload policy configuration
s:   dump system and deployment properties
t:   dump thread list
v:   dump thread stack
0-5: set trace level to <n>
Could not launch from cache. Will try online mode. [Some of required resources are not cached.]
#### Java Web Start Error:
#### java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Listener
Any suggestions on what I need to do to get the application working? This is critical for my friends bookstore to get going on Monday.

Thank you
Old 11-28-2010, 11:57 AM   #2
LQ Newbie
Registered: Nov 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Old 09-03-2013, 05:50 PM   #3
LQ Newbie
Registered: Sep 2013
Posts: 1

Rep: Reputation: Disabled
jnlp file needs rearranging

When javaws reads the os and arch properties in your resource tags, it stops as soon as it finds a match. So if the os is Windows and the architecture is x86 it will accept os="Windows" arch="x86_64" as a match. This will cause the wrong file to be loaded and potentially cause your problem. You need to put x86 before x86_64 to avoid this.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Yet another java classpath question --- java.lang.NoClassDefFoundError Jama raequin Programming 1 12-29-2009 02:04 PM
Exception in thread "main" java.lang.NoClassDefFoundError: org/aspectj/lang/Signature canonas Linux - Software 3 06-16-2008 05:00 AM
eclipse "main" java.lang.NoClassDefFoundError: sefaklc Programming 1 10-08-2007 05:35 PM
java.lang.NoClassDefFoundError robbbert Programming 6 07-16-2006 07:47 AM
java.lang.NoclassDefFoundError rlnd Programming 5 02-18-2006 05:54 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:19 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration