What means run in a j2me command line environment? I'm using Wtk2.2. I know only the "emulator" command... but... I would like to just run as normal apps...
Also... I tried to use with Eclipse... but... I failed...
I'll appreciate any help.
J2MEUnit contains a MIDlet implementation (TestRunner) that you can use to run tests. Please refer to the WTK documentation on how to run MIDlets, this is not J2MEUnit related.
Thanks for your answer. You did not get my point.
I know how to run MIDlets on WTK, using the ktoolbar, command line or even on the eclipse IDE.
My question is "how to run test classes by command line - not using the emulator exec from wtk". When trying the j2meunit.textui.TestRunner I got "Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Cloneable" (at command line). When trying the j2meunit.midletui.TestRunner, it runs, but I got "Application not authorized to access the restricted API J2ME Unit 1.1.1" (at emulator).
Any tips? Thanks in advance.
Sorry, have no idea. "java/lang/NoClassDefFoundError: java/lang/Cloneable" seems to indicate that there is something wrong with your boot classpath.
You're right! I got this using eclipse... till now I could not fix this... but I could run at command line... using java -cp "midpapi10.jar..." TestClass
It runs... but I got an error "getProperty0" when open a connection. The problem is that it expects to be inside an emulator in order to get the configuration properties. I am almost convinced I'll need to run j2me tests inside an emulator. Anyway, I still have the "Application not authorized to access the restricted API" error using emulator/MIDLet Test Runner.
It ocurrs when creating a MIDLet (I create an instance of a MIDLet to test some public methods)
Hey, one more thing: the "Application not authorized to access the restricted API" error using emulator/MIDLet Test Runner occurs only when I try to instantiate a MIDLet class. (I was testing one method from a MIDLet). If a refactor this (I put such method in a helper class), I can succesfully test that helper class.
Things are getting better... but I still search for a solution without use the "emulator"... because such way I'll have user iteration. It will not automated :(
Log in to post a comment.