Re: Troubles running samples
Olivier Poppon <[email protected]>
| Newsgroups | gmane.comp.embedded.carlsbad-cubes |
|---|---|
| Message-ID | <[email protected]> |
I am just using a jEdit and the command line.
I have just created an eclipse (3.0M6) project (inside the samples
directory).
All the java sources appear in the "Package Explorer" pane, along with
directories for icons, xml...
But when I run the Actions class, same error with "cannot instanciate
ComboModel class"
On 2 mai 04, at 22:33, masukomi wrote:
> not sure on that one. My first guess would be the current working
> directory was wrong but if that were the case then it wouldn't find
> the xml either.
>
> anyone else have an idea?
>
> Are you using an IDE to run this Oliver? if so, which one?
>
> Me, I just checked out swixml from cvs, made a new project from it in
> eclipse, and everything worked.
>
> -Kate
>
> On May 2, 2004, at 1:41 PM, Olivier Poppon wrote:
>
>> Thanks Kate for the tip on the bub.
>>
>> For the "icons issue", I am trying to run the samples from the swixml
>> distribution.
>> I havn't change anything from the original, so you should have the
>> same configuration on your system, I guess.
>>
>> Olivier
>>
>> On 2 mai 04, at 19:32, masukomi wrote:
>>
>>> There's a weird bug in SwiXml that we haven't been able to track
>>> down yet. Personally I think it's something in j2se but....
>>>
>>> The symptoms you've described sound similar to what I've seen with
>>> this bug. Basically, sometimes saying .render("some/valid/path.xml")
>>> just doesn't work. It can't find the file. I've had two almost
>>> identical classes side by side and had one work and one not. I can't
>>> explain it. I've looked at the SwiXml source and it was doing
>>> everything correctly. The way I get around it is to never specify a
>>> path that way. Instead I always use .render(new
>>> File("some/valid/path.xml")) which is arguably not the most
>>> efficient way to specify it but it's the one that requires the least
>>> typing.
>>>
>>> I can't comment on the icons issue without seeing the xml and
>>> knowing where the icons are and all that.
>>>
>>> -Kate
>>>
>>>
>>>
>>> On May 2, 2004, at 12:49 PM, Olivier Poppon wrote:
>>>
>>>> Hi,
>>>>
>>>> I have just discovered SwiXml and I would really start playing with
>>>> it, but I have a few problems just running the examples.
>>>> I have seen several similar messages in the mailing archives, but
>>>> there was no proper answer.
>>>>
>>>> I am using Mac OS X 10.3, with java 1.4.2.
>>>> I have put the swixml.jar in the /Library/Java/Extensions directory
>>>> (which add it automatically to the CLASSPATH).
>>>>
>>>> Then I go to the "samples" directory of swiXml. I compile all the
>>>> .java.
>>>> Then I try to run one :
>>>> olivier@Moon:~/Java/swixml_139/samples $ java Actions
>>>> I get this:
>>>> java.io.IOException: Resource could not be found xml/actions.xml
>>>>
>>>> I tried using a classpath like : java -classpath .:xml Actions, but
>>>> it does not work either.
>>>>
>>>> But if I change in Actions.java the instruction to load the xml
>>>> file from this :
>>>> swix = new SwingEngine( this );
>>>> swix.render( "xml/actions.xml" );
>>>> to this:
>>>> import org.jdom.input.SAXBuilder;
>>>> ...
>>>> swix = new SwingEngine( this );
>>>> swix.render( new SAXBuilder().build("xml/actions.xml") );
>>>>
>>>> Then it "works", as I can see the window/frame of the application.
>>>>
>>>> However, I see no icons in the menu bar
>>>> (I also tried to run it using a classpath like : java -classpath
>>>> .:icons)
>>>>
>>>> and the combo does not work (there is a reference to it inside the
>>>> actions.xml as <combobox initclass="ComboModel" Action="petAction"
>>>> PrototypeDisplayValue="1234567890|1234567890"/>), and I have this
>>>> error :
>>>> initclass not instantiated :
>>>> ComboModeljava.lang.ClassNotFoundException: ComboModel
>>>>
>>>> This ComboModel class is in the same directory as Actions.
>>>>
>>>> Can anyone help me on this ?
>>>>
>>>> Thanks,
>>>>
>>>> Olivier
>>>>
>>>>
>>>> _______________________________________________
>>>> Forum mailing list
>>>> [email protected]
>>>> http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com
>>>>
>>>>
>>>
>>>
>>> _______________________________________________
>>> Forum mailing list
>>> [email protected]
>>> http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com
>>>
>>
>>
>> _______________________________________________
>> Forum mailing list
>> [email protected]
>> http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com
>>
>>
>
>
> _______________________________________________
> Forum mailing list
> [email protected]
> http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com
>