List Info

Thread: Re:Re:Executing SC from Netbeans




Re:Re:Executing SC from Netbeans
user name
2007-05-06 02:02:49
Hello !


Thanks for your response, I've resolved my problem.

But now in a same way, I want to implement a Timer into my
RSS  
protocol using the javax.swing.Timer
package, included into the JDK since version 1.4 (according
to  
java.sun.com website).
No problem when compiling, but always the error message
"java.lang.NoClassDefFoundError
javax/swing/Timer".
Logically, I should include swing.jar into the building of
my bundle,  
but I can't find the file swing.jar
nowhere...

What do you think about it?

Thanks.

Jean-Albert.

> Hi Brian,
>
> I had the same problem, it's because when you build
your bundle you   
> don't include your jar files into it, just add this
lines in the   
> build.xml file where you build your bundle (one line
for each jar  
> file):

> <zipfileset
src="${lib.noinst}/Your_Jar_File_Name.jar"
prefix=""/>

> Stéphane

> Quoting Brian Burch <brianPingToo.com>:

> Jean-Albert Vescovo wrote:
>> Hi,
>>
>>
>> Coding a new protocol (RSS) into SC project under
Netbeans 5.5, I'm  
>>   encoutering problems during the execution of SC:
>> I have inserted with success some libraries (.jar)
into the project  
>>   (lib directory) in order to compile my code
--> no problem.
>> This elementary code has to read a rss feed when
the user insert a   
>>  new feed address as a new contact.
>>
>> But when I launch SC with the "run"
directive in build.xml, and I    
>> insert a new rss feed, I can see into the console
of Netbeans the    
>> message "java.lang.NoClassDefFoundError"
about a class included in   
>>  one of the .jar library previously added into the
project.
>> Normally, that wants to say that the JVM doesn't
found the required  
>>   class, but...
>>
>> Do you have any idea about the origin of this
problem ?
>>
>
> I suspect there may have been recent changes to the
project compile or
> run classpath. These changes might have been reflected
into the
> /ide/eclipse CVS directory, but have been overlooked in
the
> /ide/netproject directory.
>
> I usually try to keep the netbeans environment
up-to-date, but I
> haven't had time lately. I haven't built, tested or
executed SC under
> netbeans for at least a month.
>
> I probably won't have time to look at your problem
during this week,
> but perhaps someone else can look at it based on my
initial thoughts. I
> would start by comparing the classpath elements
between
> /ide/eclipse/.classpath and
/ide/nbproject/project.xml.
>
> By the way, did you remember to copy project.xml into
your own
> sandbox/nbproject/project.xml when netbeans was shut
down?
>
> Regards,
>
> Brian




------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net


Re: Re:Re:Executing SC from Netbeans
user name
2007-05-06 09:59:58
Hello Jean-Albert,

Swing is part of the JRE so you won't need to explicitly
include it in 
your bundle.

However, I suspect you might have forgotten to add
javax.swing to the 
list of imported packages in your manifest file. This would
explain the 
NoClassDefFoundError that you are receiving.

As a side note, unless you are planning on using the timer
for some UI 
related management, it might be a better idea to use the
java.util.Timer 
instead of the Swing one. If you'd like to read more on the
difference 
between the two, have a look at this article:


http://java.sun.com/products/jfc/tsc/articles/timer/

Don't hesitate in case other questions arise.

Cheers
Emil



Jean-Albert.Vescovoulp.u-strasbg.fr wrote:
> Hello !
> 
> 
> Thanks for your response, I've resolved my problem.
> 
> But now in a same way, I want to implement a Timer into
my RSS  
> protocol using the javax.swing.Timer
> package, included into the JDK since version 1.4
(according to  
> java.sun.com website).
> No problem when compiling, but always the error
message
> "java.lang.NoClassDefFoundError
javax/swing/Timer".
> Logically, I should include swing.jar into the building
of my bundle,  
> but I can't find the file swing.jar
> nowhere...
> 
> What do you think about it?
> 
> Thanks.
> 
> Jean-Albert.
> 
>> Hi Brian,
>>
>> I had the same problem, it's because when you build
your bundle you   
>> don't include your jar files into it, just add this
lines in the   
>> build.xml file where you build your bundle (one
line for each jar  
>> file):
> 
>> <zipfileset
src="${lib.noinst}/Your_Jar_File_Name.jar"
prefix=""/>
> 
>> Stéphane
> 
>> Quoting Brian Burch <brianPingToo.com>:
> 
>> Jean-Albert Vescovo wrote:
>>> Hi,
>>>
>>>
>>> Coding a new protocol (RSS) into SC project
under Netbeans 5.5, I'm  
>>>   encoutering problems during the execution of
SC:
>>> I have inserted with success some libraries
(.jar) into the project  
>>>   (lib directory) in order to compile my code
--> no problem.
>>> This elementary code has to read a rss feed
when the user insert a   
>>>  new feed address as a new contact.
>>>
>>> But when I launch SC with the "run"
directive in build.xml, and I    
>>> insert a new rss feed, I can see into the
console of Netbeans the    
>>> message
"java.lang.NoClassDefFoundError" about a class
included in   
>>>  one of the .jar library previously added into
the project.
>>> Normally, that wants to say that the JVM
doesn't found the required  
>>>   class, but...
>>>
>>> Do you have any idea about the origin of this
problem ?
>>>
>> I suspect there may have been recent changes to the
project compile or
>> run classpath. These changes might have been
reflected into the
>> /ide/eclipse CVS directory, but have been
overlooked in the
>> /ide/netproject directory.
>>
>> I usually try to keep the netbeans environment
up-to-date, but I
>> haven't had time lately. I haven't built, tested or
executed SC under
>> netbeans for at least a month.
>>
>> I probably won't have time to look at your problem
during this week,
>> but perhaps someone else can look at it based on my
initial thoughts. I
>> would start by comparing the classpath elements
between
>> /ide/eclipse/.classpath and
/ide/nbproject/project.xml.
>>
>> By the way, did you remember to copy project.xml
into your own
>> sandbox/nbproject/project.xml when netbeans was
shut down?
>>
>> Regards,
>>
>> Brian
> 
> 
> 
> 
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
> For additional commands, e-mail: dev-helpsip-communicator.dev.java.net
> 
> 

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )