[Bluej-discuss] bluej and user defined annotations

Aryeh Friedman aryeh.friedman at gmail.com
Thu Sep 27 05:12:21 BST 2007


btw you can DL an executable jar of it from
http://www.flosoft-systems.com/downloads/thisTest.jar... I discovered
this while attempting to backwards engineer the process of making an
executable jar (figured that out from several sources)

--Aryeh

On 9/27/07, Aryeh Friedman <aryeh.friedman at gmail.com> wrote:
> oops I ment open.... here is all the package statements:
>
> % grep package `find . -name '*.java'`
> ./dev/utest/ui/cmdline/Main.java:package dev.utest.ui.cmdline;
> ./dev/utest/ui/swing/LabeledRadioGroup.java:package dev.utest.ui.swing;
> ./dev/utest/ui/swing/SwingDisplay.java:package dev.utest.ui.swing;
> ./dev/utest/ui/swing/LabeledTextArea.java:package dev.utest.ui.swing;
> ./dev/utest/ui/swing/Main.java:package dev.utest.ui.swing;
> ./dev/utest/ui/swing/LabelGroup.java:package dev.utest.ui.swing;
> ./dev/utest/ui/swing/SwingControler.java:package dev.utest.ui.swing;
> ./dev/utest/ui/swing/TestTypeListener.java:package dev.utest.ui.swing;
> ./dev/utest/core/Settings.java:package dev.utest.core;
> ./dev/utest/core/TestSuite.java:package dev.utest.core;
> ./dev/utest/core/TestCase.java:package dev.utest.core;
> ./dev/utest/core/TestSet.java:package dev.utest.core;
> ./dev/utest/core/Result.java:package dev.utest.core;
> ./dev/utest/core/TestException.java:package dev.utest.core;
> ./dev/utest/core/Assert.java:package dev.utest.core;
> ./dev/utest/core/TestType.java:package dev.utest.core;
> ./dev/utest/core/Test.java:package dev.utest.core;
> ./dev/utest/core/TestEventType.java:package dev.utest.core;
> ./dev/utest/core/TestEventListener.java:package dev.utest.core;
> ./dev/utest/core/TestEvent.java:package dev.utest.core;
> ./test/dev/utest/core/TestAll.java:package test.dev.utest.core;
> ./test/dev/utest/core/TestTest.java:package test.dev.utest.core;
> ./test/dev/utest/core/TestResult.java:package test.dev.utest.core;
> ./test/dev/utest/core/TestTestSet.java:package test.dev.utest.core;
> ./test/dev/utest/core/TestSettings.java:package test.dev.utest.core;
> ./test/dev/utest/core/TestBadTest.java:package test.dev.utest.core;
> ./test/dev/utest/core/TestTestEventListener.java:package test.dev.utest.core;
> ./test/dev/utest/TestAll.java:package test.dev.utest;
> ./test/dev/TestAll.java:package test.dev;
> ./test/TestAll.java:package test;
> %
>
>
>
> On 9/27/07, Davin McCall <davmac at bluej.org> wrote:
> > Ok, but what is the package hierarchy as BlueJ sees it? Refer to my
> > previous email... your project should have multiple packages. If not,
> > you may have created it incorrectly.
> >
> > (Speaking of which, when you say you did "import non-BlueJ", did you
> > mean "open non-BlueJ" or "import"?)
> >
> > Davin
> >
> >
> > Aryeh Friedman wrote:
> > > Here is the physical layout of the dev.utest.core dir (all of them are
> > > declared as that package):
> > >
> > > Assert.java             TestCase.java           TestException.java
> > > Result.java             TestEvent.java          TestSet.java
> > > Settings.java           TestEventListener.java  TestSuite.java
> > > Test.java               TestEventType.java      TestType.java
> > >
> > > Note I created the project by doing import non-bluej.
> > >
> > > --Aryeh
> > >
> > > On 9/27/07, Davin McCall <davmac at bluej.org> wrote:
> > >
> > >> Hi,
> > >>
> > >> Could it be that you have created a BlueJ project without the
> > >> appropriate package hierarchy? That is, that you have a project with
> > >> this TestCase annotation inside it, but it's not inside a package
> > >> dev.utest.core (although it's declared to be)? This would mightily
> > >> confuse the compiler. (To clarify, inside your project's "unnamed"
> > >> package there should be a "dev" sub-package, and inside that there
> > >> should be a "utest" sub-package, with a "core" sub-package inside that,
> > >> which should contain the TestCase interface).
> > >>
> > >> If that's not the issue, then I guess the next obvious question is:
> > >> where is TestType actually defined?
> > >>
> > >> Davin
> > >>
> > >>
> > >>
> > >> Aryeh Friedman wrote:
> > >>
> > >>> The following code compiles and works just fine from the command line
> > >>> but blows up when compiled with BlueJ:
> > >>>
> > >>> package dev.utest.core;
> > >>>
> > >>> import java.lang.annotation.Retention;
> > >>> import java.lang.annotation.RetentionPolicy;
> > >>>
> > >>> /**
> > >>>  * Mark a method as being a test case
> > >>>  *
> > >>>  * @author Aryeh M. Friedman
> > >>>  */
> > >>> @Retention(RetentionPolicy.RUNTIME)
> > >>> public @interface TestCase
> > >>> {
> > >>>       TestType value() default TestType.All;    // can not find symbol -- TestType
> > >>> }
> > >>>
> > >>> There are two possibilities I can think of:
> > >>>
> > >>> 1. I use a jvm wrapper (external to BlueJ) and had rewrote the bluej
> > >>> startup script to use it instead of the jvm selected at install time
> > >>> (I have 1.4, 1.5 and 1.6 all installed)
> > >>>
> > >>> 2. BlueJ has issues with the code
> > >>>
> > >>> My normal command line is:
> > >>>
> > >>> javac -d ~plos/obj *.java
> > >>>
> > >>> (CLASSPATH is ~plos/obj)
> > >>>
> > >
> >
> > _______________________________________________
> > mailing list bluej-discuss at bluej.org
> > To unsubscribe or change your preferences, go to
> > http://lists.bluej.org/mailman/listinfo/bluej-discuss
> >
>


More information about the bluej-discuss mailing list