On 05/03/2012 04:44 PM, Arved Sandstrom wrote:
> On 12-05-03 08:05 PM, Lew wrote:
> [ SNIP ]
>
>> That said, the error message doesn't jibe well with what we're seeing. You don't call any constructors, so it's odd the error message refers to constructors.
> [ SNIP ]
>
> It doesn't jibe, no. OTOH, a search on the VerifyError message +
> "NetBeans" does turn up indications that NB exhibits this error in
> several situations. Often solved, just as with Eclipse in umpteen
> circumstances, with the classic "Clean-Rebuild-Try Again-Curse-Repeat"
> cycle.
>
> I wouldn't rule out that there is NetBeans badness here. I figure most
> of us have encountered situations where you open up an IDE on a project,
> where the day before everything was OK, and now suddenly it's seriously
> out of whack.
>
> Your suggestion to have the OP try the build and run on the command line
> is a great idea. I strongly second that.
>
> AHS
Programs java and javac are in directory: /home/bilsch/jdk7/bin/
Offending program, Nvr1.java is in directory:
/home/bilsch/NetBeansProjects/NVRAM/src/
environment variable PATH is:
/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
However note that when I run; java Nvr1.class (or simply Nvr1) from my
home directory the output errors are in javanese, as follows:
bilsch@p4pwj:~/jdk7/bin$ java Nvr1
Exception in thread "main" java.lang.NoClassDefFoundError: Nvr1
Caused by: java.lang.ClassNotFoundException: Nvr1
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: Nvr1. Program will exit.
bilsch@p4pwj:~/jdk7/bin$ cd
bilsch@p4pwj:~$ java Nvr1.class
Exception in thread "main" java.lang.NoClassDefFoundError: Nvr1/class
Caused by: java.lang.ClassNotFoundException: Nvr1.class
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: Nvr1.class. Program will exit.
Therefore the command line is hooked up with the java directory -
regardless of the PATH.
When I change working directory to /home/bilsch/jdk7/bin/ and type in
the path and filename for the offending file I get the following output:
bilsch@p4pwj:~/jdk7/bin$ javac /NetBeansProjects/NVRAM/src/Nvr1
The program 'javac' can be found in the following packages:
* openjdk-6-jdk
* ecj
* gcj-4.4-jdk
* gcj-4.6-jdk
* gcj-4.5-jdk
* openjdk-7-jdk
Try: sudo apt-get install <selected package>
bilsch@p4pwj:~/jdk7/bin$
bilsch@p4pwj:~/jdk7/bin$
Ubuntu can't find javac even though I ran it from the directory where
javac resides. It can't find it from the home directory either.
THE SHORT ANSWER IS I CAN'T COMPILE OR RUN JAVA FROM MY LINUX COMMAND
LINE. I can't answer your question of what the output is when running
command line. Also I have no idea why Linux won't do it. I'LL HAVE TO
WORK ON THAT.
I have to figure how to run from command line in linux. If I could run
using Windows command line and it worked that would be inconclusive ie.
taking Linux out of the equation. If I could run it in Windows command
line tonight and it worked OK that wouldn't mean it would still work 4
days from now?
This could be a Linux glitch rather than Java.
Thanks for listening. Bill S.