Originally posted by: z0mb13
OK I am trying to make a really simple class and run it, however it just doesnt work:
public class Test {
void main() {
System.out.println("Hello World");
}
}
The problem is not in the code, but the settings , or whatever.. any help??
can you be a little more specific with what the problem is than?The problem is not in the code, but the settings , or whatever.. any help??
Originally posted by: DannyLove
can you be a little more specific with what the problem is than?The problem is not in the code, but the settings , or whatever.. any help??
danny~!
Originally posted by: KeyserSoze
Originally posted by: z0mb13
OK I am trying to make a really simple class and run it, however it just doesnt work:
public class Test {
void main() {
System.out.println("Hello World");
}
}
The problem is not in the code, but the settings , or whatever.. any help??
I will tell you this, I had SEVERE problems getting simple projects to work, just because of the way I had the "Save To" of the Projects path and stuff like that. Good luck with this, sorry I can't be much help.
It might help if you 1) Post in the Other Forum, or 2) At LEAST tell us what it's saying.
KeyserSoze
Originally posted by: KingNothing
Originally posted by: KeyserSoze
Originally posted by: z0mb13
OK I am trying to make a really simple class and run it, however it just doesnt work:
public class Test {
void main() {
System.out.println("Hello World");
}
}
The problem is not in the code, but the settings , or whatever.. any help??
I will tell you this, I had SEVERE problems getting simple projects to work, just because of the way I had the "Save To" of the Projects path and stuff like that. Good luck with this, sorry I can't be much help.
It might help if you 1) Post in the Other Forum, or 2) At LEAST tell us what it's saying.
KeyserSoze
LOL, it's ATOT and...whatever else is on that drop-down list.
Originally posted by: KingNothing
1) Download and install the JDK from Sun's website.
2) Add c:\[java directory]\bin to your PATH statement.
3) Put this code in a .java file
public class FirstProgram
{
public static void main(String[] args)
{
int x = 2147483647;
for (int y = 0; y < 5; y++)
{
System.out.println(x++);
}
}
}
4) Open a command window, navigate to the directory where you saved your file, type "javac FirstProgram.java". This will create a file called FirstProgram.class. Filename MUST be the same as main class name.
to run your program, type "java FirstProgram"
Edit: the purpose of doing this is to determine if the problem is in your code or JBuilder. If you can do all this successfully, then you just need to read JBuilder's help and figure out what you need to do. You might try adding the directory that you save your programs in to your PATH statement as well.
Originally posted by: z0mb13
Originally posted by: KingNothing
1) Download and install the JDK from Sun's website.
2) Add c:\[java directory]\bin to your PATH statement.
3) Put this code in a .java file
4) Open a command window, navigate to the directory where you saved your file, type "javac FirstProgram.java". This will create a file called FirstProgram.class. Filename MUST be the same as main class name.
to run your program, type "java FirstProgram"
Edit: the purpose of doing this is to determine if the problem is in your code or JBuilder. If you can do all this successfully, then you just need to read JBuilder's help and figure out what you need to do. You might try adding the directory that you save your programs in to your PATH statement as well.
OK Im sick and tired of playing with J builder, ill just do it from the command window then
Can u explain more about no 2? how can I do this?? where is my PATH??
Originally posted by: KingNothing
Originally posted by: z0mb13
Originally posted by: KingNothing
1) Download and install the JDK from Sun's website.
2) Add c:\[java directory]\bin to your PATH statement.
3) Put this code in a .java file
4) Open a command window, navigate to the directory where you saved your file, type "javac FirstProgram.java". This will create a file called FirstProgram.class. Filename MUST be the same as main class name.
to run your program, type "java FirstProgram"
Edit: the purpose of doing this is to determine if the problem is in your code or JBuilder. If you can do all this successfully, then you just need to read JBuilder's help and figure out what you need to do. You might try adding the directory that you save your programs in to your PATH statement as well.
OK Im sick and tired of playing with J builder, ill just do it from the command window then
Can u explain more about no 2? how can I do this?? where is my PATH??
There is knowing the PATH, and there is walking the PATH. Sorry.
What OS are you running?
Originally posted by: KeyserSoze
For XP:
Go to "My Computer", right click, then "Properties", then "Advanced", then "Environment Variables", then.....damn, I got stuck here.
Someone else want to do this?
KeyserSoze
Originally posted by: KingNothing
Originally posted by: KeyserSoze
For XP:
Go to "My Computer", right click, then "Properties", then "Advanced", then "Environment Variables", then.....damn, I got stuck here.
Someone else want to do this?
KeyserSoze
You got stuck at the finish line? The PATH bit is fairly visible once you're to this point...
Originally posted by: KeyserSoze
Originally posted by: KingNothing
Originally posted by: KeyserSoze
For XP:
Go to "My Computer", right click, then "Properties", then "Advanced", then "Environment Variables", then.....damn, I got stuck here.
Someone else want to do this?
KeyserSoze
You got stuck at the finish line? The PATH bit is fairly visible once you're to this point...
Haha, yeah, I suck. But what do you put in for "Variable Name", does it matter? Then the path, is just the path to the "bin" folder of the Java Directory of the JSDK, right?
KeyserSoze
Originally posted by: z0mb13
err ok
which JDK should I download??
Originally posted by: z0mb13
OK I did all that
I successfully compiled the test.java by doing javac test.java
but when I try to run it I get this:
C:\Documents and Settings\henry gunawan>java test.class
Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion'
has value '1.4', but '1.3' is required.
Error: could not find java.dll
Error: could not find Java 2 Runtime Environment.