I'm working on, of all things, my Master's Thesis. I was going to use a CBC with the JVM. I installed the JVM on my machine w/ eclipse and on the cbc. My test program looks like this:
public class main {
public main()
{
System.out.println("Hello CBC!");
}
}
When I run the compiled .c all I get is a message saying:
"Static method "main" not found in Main"
I'm sure I'm making a shameful beginners mistake, or its something specific to this modded install of the JVM.
Some Help?
Scott
minus the spam,,,
bump
All is fair in love and war, and botball is both :)
Hey Scott, thanks for considering CBCJVM for use with your thesis! I am interested to see your research! The correct definition for a main method is as follows:
public static void main(String[] args) {
}
Be sure to also capitalize the class name, it is required to be "Main" with a capital M!
If you want faster support, you can email me at braden DOT mcdorman AT ossm DOT edu or my AIM bcmCatron. (Hopefully that is enough to thwart the spam bots.)
"When you do things right, people won't know you've done anything at all."
Sorry about the spam... We just had a bot create an account and in seconds post 200 posts.
Wesley Myers
--
Botball YAC Vice President
Botball International Champion 2007 and 2008
Carnegie Mellon University 2012
Electrical and Computer Engineering
Computer Science and Robotics
I actually attempted the corrections you recommended the other evening, and continued to have issues. This time relating to particular java libraries not being found. I thought it was an installation issue, and tried to reinstall, but no dice. I've actually decided to attempt another route for the time being, but if I revisit this option I'll let you know.
Thanks for the help.
Scott
All is fair in love and war, and botball is both :)
Sorry for not posting sooner (I haven't been watching the community site very much recently).
At the risk of repeating what you may have already done, or what Catron may have said:
Main.java(case is important, and must match the class name). If you're not familiar with Java, I suggest you start here: http://download.oracle.com/javase/tutorial/getStarted/application/index....javacyou should end up with something likejavac -cp .:/absolute/path/to/cbcjvm/cbc/dist/lib/CBCJVM.jar Main.javaMain.javaprogram should be as simple as runningjava Main. As a note: if this program did depend on CBCJVM-specific libraries, which it doesn't, you would have to specify the classpath again, likejava -cp .:/absolute/path/to/cbcjvm/cbc/dist/lib/CBCJVM.jar Maininstall_datafolder that you put on your flashdrive earlier. Take a look at thatcodefolder. Look at how the examples are put in there. Put your program in there like that (plus a.classfile, CBCJVM doesn't have a compiler on the CBC, you must compile your program before transferring it over. The examples don't have these just simply because we haven't figured out a good way to automatically compile all the examples with ant yet.), and run the installer again (orCodeInstall.c, which only re-installs the code folder, and is thus much faster). The.cis simply a launcher, because the CBC's ui can't handle Java files.If you have any further problems, you can contact catron, or me. I'm almost always on the Botball IRC (Community Chat). Just mention my nick,
pipeep.CBCJVM|CBCJVM-GCER-Paper|CBCDownloader|IRC
Now a 2010/2011 YAC member!