[rules-users] Still can't create a standalone application
Mark Proctor
mproctor at codehaus.org
Thu Sep 6 11:23:11 EDT 2007
when you figure it out, you are welcome to update the wiki (open toall)
to make up a setp-by-step guide to configuring the classpath for Drools
application compilation and execution.
Mark
MarkA wrote:
> That still hasn't fixed it. I can now compile it with javac without errors
> but it still gives noclassdeffound error when it runs.
>
> At least I now have your example that does work, so I am going to modify it
> bit by bit until I find out where my mistake is. My initial one was created
> with the wizard in eclipse so I'm not sure what has happened!
>
> Anyway, I will persevere and post the results in case anyone else needs
> pointers.
>
> Thanks all.
>
> Mark.
>
> Mark Proctor wrote:
>
>> MarkA wrote:
>>
>>> Okay, many thanks for this.
>>>
>>> Firstly, I apologise if I am asking these questions in the wrong place, I
>>> don't want to waste people's time but it is *very* frustrating for new
>>> users
>>> when problems like this occur. I scoured the documentation, the
>>> quick-start
>>> guide, the faqs and searched on the internet but could find no help. From
>>> some of the responses I have received from the various sources it seems
>>> that
>>> I am not the only person hitting these issues.
>>>
>>> Secondly, it looks like my error is that I set the CLASSPATH to point at
>>> the
>>> directories, .../JAR and .../JAR/lib, not each individual .jar file as in
>>> your batch file. I had tried it with just the small set of .jars that you
>>> have and, as far as I can tell, the only difference is using the
>>> directories
>>> in the CLASSPATH variable. I'll change that in mine and see what happens
>>> but
>>> I can compile and run the example you sent which is fantastic.
>>>
>>>
>> This is standard Java, I don't think this is something we should be
>> explaining, as it's done in hundreds of places around the net.
>>
>>> Many thanks again and sorry for being stupid.
>>>
>>>
>> np, stupid Qs are allowed (we get lots of them), but you have to expect
>> a bit ot stick with them - call it character building ;) Good luck.
>>
>>> Mark Proctor wrote:
>>>
>>>
>>>> sigh.... I've zipped up droools-examples eclipse project with a
>>>> populated lib directory and a dos .bat file. Should be enough to get you
>>>> over the basics of java classpath configuration:
>>>> http://wiki.jboss.org/wiki/PageInfo.jsp?page=JBossRules%2Fdrools-examples-401-runfib.zip
>>>>
>>>> Mark
>>>> MarkA wrote:
>>>>
>>>>
>>>>> I'm close to giving up!
>>>>>
>>>>> No matter what I do I get the noclassdeffound error. I can't get
>>>>> anything
>>>>> that uses Drools to work outside of eclipse.
>>>>> I've now tried using javac and I still get errors, the first is:
>>>>> ----------------------------------------------------------------------------------------------------------------
>>>>>
>>>>> [javac] [search path for source files:
>>>>> [/Users/mark/Documents/eclipse/drools-test-mini/src]]
>>>>> [javac] [search path for class files: [... (lots of paths removed) ...
>>>>> /Users/mark/Documents/eclipse/drools-test-mini/JAR
>>>>> ...]]
>>>>> ...
>>>>> [javac]
>>>>> /Users/mark/Documents/eclipse/drools-test-mini/src/com/mda/dt/DroolsTest.java:6:
>>>>> package org.drools does not exist
>>>>> [javac] import org.drools.RuleBase;
>>>>> [javac] ^
>>>>>
>>>>> ----------------------------------------------------------------------------------------------------------------
>>>>>
>>>>> But the directory '/Users/mark/Documents/eclipse/drools-test-mini/JAR'
>>>>> has
>>>>> the following:
>>>>>
>>>>> antlr-runtime-3.0.jar drools-compiler-4.0.1.jar
>>>>> mvel14-1.2rc4rv908.jar xpp3_min-1.1.3.4.O.jar
>>>>> core-3.2.3.v_686_R32x.jar drools-core-4.0.1.jar
>>>>> xercesImpl-2.4.0.jar xstream-1.2.2.jar
>>>>> drools-ant-4.0.1.jar jxl-2.4.2.jar
>>>>> xml-apis-1.0.b2.jar
>>>>>
>>>>> The org.drools.RuleBase is in the drools-core jar file so what is it
>>>>> that
>>>>> I
>>>>> am doing wrong?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>> _______________________________________________
>>>> rules-users mailing list
>>>> rules-users at lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/rules-users
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070906/ae1864f2/attachment.html
More information about the rules-users
mailing list