No, I have the problem that Min originally had.
I'm trying to run the OS nachos, itself. (with eclipse, running on windows
xp)
It can't find main in nachos.machine.Machine
Specifically, when I try to run Nachos, I get the following error popup:
"Could not find the main class. Program will exit."
The error message on the console reads:
"java.lang.NoClassDefFoundError: nachos/machine/Machine"
Moving everything to the src folder kind of messes up my file system, but
nachos does run and provides the lines of output that it is supposed to
after a successful run.
HOWEVER, doing this makes it so that I can't commit to SVN, most likely
since my file system is weird (I don't normally put all my files in the src
folder). And since not everyone in my group uses Eclipse, as well as since I
want it to compile correctly after we submit it, it would be *very bad* for
me to just use this setup. I want to instead find a way so that I can
compile and run nachos with the default setup or at least set it up
correctly so that I can use SVN without having to worry about any
differences in the file system.
Anyway, here is a screenshot of what part of my setup looks like:
Loading Image...
Can anyone please tell me what I am doing wrong and how to fix it? Thanks.
---------------
are you trying to make a test class to test something and trying to run
that
Could not find the main class. Program will exit.
java.lang.ExceptionInInitializerError
Caused by: java.lang.NullPointerException
at nachos.threads.Lock.<init>(Lock.java:78)
at nachos.threads.Communicator.<init>(Communicator.java:25)
at nachos.threads.communicatorTest.<clinit>(communicatorTest.java:4)
Exception in thread "main"
something like that?
if yes, then you need to go look at the ThreadedKernel class in the
selfTest
method. it's where you should be putting in methods that you want to
test.
-------------
Post by Max PrestonIs this really the only way to make it so that Eclipse can find main in
nachos.machine.Machine? Because I tried moving everything to my src folder
and now I can't commit anything with SVN, probably since my file structure
is totally different now.
Is there any way to get this to work without messing up my file structure??
It seems like there REALLY should be a way! But if you just follow the
"Running Nachos" instructions at
http://inst.eecs.berkeley.edu/~cs162/fa07/Nachos/eclipse/, Eclipse just
can't find main anywhere...
Please help! Thanks!
I fixed the problem. Eclipse requires that we put all the source files in
the src folder which I didn't do.
Post by Thomas KhoPost by Min XuHi, did anyone actually successfully run Nachos in Eclipse yet? I
"java.lang.NoClassDefFoundError: nachos/machine/Machine
Exception in thread "main" "
I have Eclipse 3.2 with the latest version of Subclipse.
1. I checked out the entire nachos folder from
"https://isvn.eecs.berkeley.edu/cs162/group24/trunk" and configured it
as a new Java project ("CS162") in my Eclipse workspace.
2. I configured Run Dialog to run "CS162" project and use
"nachos.machine.Machine" as main. I also changed working directory to be
".../nachos/proj1" as opposed to just the default nachos.
3. I click run, hoping for the best
4. My hope is shattered by the NoClassDefFoundError
http://inst.eecs.berkeley.edu/~cs162/fa07/Nachos/eclipse/
See if that helps you out, especially the "Running Nachos" section.
-Tom