• Welcome to SpeedSolving.com — the world’s largest puzzle community!

    You’re currently browsing as a guest, which means you have limited access to discussions, resources, member profiles, and community features.

    Join 50,000+ cubers and puzzle enthusiasts from around the world to ask questions, share solves, improve faster, and be part of the community.

    Registration is free, fast, and easy — create your account today.

    Already a member? Log in here to hide this message and start participating.

Those experienced in Java: What am I doing wrong?

Edward

Veteran
Joined
Oct 17, 2009
Messages
2,497
Location
Your default internet browser
WCA
2011KING01
YouTube
Visit Channel
Okay, so I'm trying to learn Java here, and I think I'm making this Hello World program correctly. But there's a problem. When I try to compile it, it gives me
1 error found:
File: (no associated file) [line: (no source location)]
Error: java.lang.NullPointerException

screenshotfrom201206182.png

Code:
public class HelloWorld
{
 public static void main(String[] args)
 {
   System.out.println("Hello World");
 }
}
That's my code. What did I do wrong? Everything seems to be in order. Is it a problem with my IDE? :confused:
Thanks in advance.
 
Your code is correct so there must be a problem with the way you are compiling it. Are you using an IDE or just the JDK?

Oh this is a bit embarrassing. Thanks for telling me my code was correct. It led me to get a new IDE (using Geany now) and that had everything running crispy and clean.

I guess this thread is done, son.
 
I believe that the principal problem is that you are using the Java programming language.

The solution is to avoid using the Java programming language in favor of another programming language like:

1. Motorola 68000 assembly
2. Fortran 90 (or 95)
3. Standard ML

I hope this helps.
 
Last edited:
If I had to name my five most favorite programming languages, Java, 68000 assembly and earlier versions of Fortran would be included. The 68000 has a clean machine code, the only thing better is the assembler for the DecSystem-20. The 90 Fortran version already has absorbed too much Pascal crap.
 
use Eclipse
Were you using Eclipse before?
Before I was using some crappy program, I think it was called Dr. Java(?)
Eclipse won't work on my system for some reason (old ass computer with Linux mint) and I can't be bothered to make it work. Geany seems just fine. Is it not? :O
 
Last edited:
Back
Top