Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
IMJack

Java

Recommended Posts

Does anyone here know anything about Java? I get the following eror when I try to compile anything with javac.

C:\Download\Java>javac FibonacciTest.java
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/tools/javac/M
ain

C:\Download\Java>
FibonacciTest.java was copied directly from the Dietel example CD, so I know the fucking thing is supposed to work. PATH has been set correctly, as far as I can tell.
C:\Download\Java>path
PATH=C:\WINDOWS;c:\windows;c:\windows\COMMAND;C:\J2SDK1.4.0\BIN
That last entry. I look NoClassDefFound up in the API; a lot of frickin' help that was. :\ Do I need to reinstall the SDK, or change the settings so it actually knows where to look, or what?

Share this post


Link to post

Interesting, I'm doing this stuff in my java class right now :) I don't know how much I can help though, due to my 2 week experience in java :\

What kind of program is this? I'm going to go ahead and assume it requires some sort of input. I'm not sure how to give it through DOS, because I use some prog at school to compile and execute java files. I'll probaly be able to give you a better answer tommorow when I can look through my java book, because I remember experiencing these no class define errors and fixing them. Heh.

Share this post


Link to post

Fixed it, kinda. The PATH isn't working for some reason, and I put the damn thing in Autoexec.bat.

gatewatcher asked:
What kind of program is this? I'm going to go ahead and assume it requires some sort of input.

Hai. This assignment involves an applet, taking an integer and using modulus and boolean values to return if it is even or odd. I can slide the source file your way if you want to take a look at it. I'm just starting Java classes myself.

Share this post


Link to post

Ooh. Let me see! I'm senshigoku@comcast.net. I've been working with Java a while now though I haven't really done anything with it. Oh also, there's something I'm curious about. If there's such thing as a Java compiler that compiles it fully to assembly language for a specific OS so it would run faster rather than being interpereted. I know it would lose it's cross-platform capabilities, but it's the only language I know, and so sometimes it be nice to have a compiler for a different purpose.

Share this post


Link to post
JavaGuy said:

Ooh. Let me see! I'm senshigoku@comcast.net. I've been working with Java a while now though I haven't really done anything with it. Oh also, there's something I'm curious about. If there's such thing as a Java compiler that compiles it fully to assembly language for a specific OS so it would run faster rather than being interpereted. I know it would lose it's cross-platform capabilities, but it's the only language I know, and so sometimes it be nice to have a compiler for a different purpose.

GCJ can compile Java to native machine code as well as JVM bytecode.

Share this post


Link to post

Wow. I'm suprised I haven't heard of it yet. Although, if they can't support AWT then they've still got quite a ways to go. Thanks a bunch fraggle.

Share this post


Link to post

Try putting a ; after the last entry in the path... What you're getting is definately some type of path error, which I have seen all too many of. I seem to recall that everything in the PATH needs a semicolon in it, but I could be mistaken.

Share this post


Link to post
david_a said:

Try putting a ; after the last entry in the path... What you're getting is definately some type of path error, which I have seen all too many of. I seem to recall that everything in the PATH needs a semicolon in it, but I could be mistaken.

I'll try that. I stuck it in Autoexec, so I'll see once I reboot my comp.

Share this post


Link to post

Eureka! I have made my first Java animation! I probably coulda done it sooner, but this thread motivated me, because I finally know some people who work with Java (ya see, I felt pretty alone for a while there). Everyone feel happy and rejoice, for on this day nothing can go wrong.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×