• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

HELP: Jbuilder users

z0mb13

Lifer
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??



 
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
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: DannyLove
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?

danny~!


I know exactly what he's talking about. It's SUCH A pain setting up a project in JBuilder. I'm sure once you get it, it's easy. But I had troubles just setting up a project, then running it.




KeyserSoze
 
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.
 
Here's some general advise than:

When creating a new project, don't include any package's just name your main project name, and maybe edit the source, and cache all in one directory, and just select the three check boxes in the left column, IE: Main Method...Main Header i forget the others

Than just create your Class, again with no package and copy paste your code if nothing is wrong with it. Takes time when first using Jbuilder (btw this program sucks) but i was forced to use it for my class last quarter.

danny~!

 
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.


I meant the Software, Programming, and Games forum. More power to him posting it here, I was just saying that he *might* have more luck over there.


KeyserSoze
 
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.

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: 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: 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?

XP
 
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: 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: 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: 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

Path is the variable name, value is c:\[jdk path]\bin. If there's already stuff in there put a semicolon at the end of it and add this on.
 
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.
 
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.


I can't guarantee this will work, but a quick Google Search led me to this:
Java Sun Forums, possible fix



KeyserSoze

 
ok I fiddled with my comp a little bit

now it doesnt even recognize javac command! WTHHHH :|

EDIT: nevermind I fixed this, thanks a lot guys!!

 
Back
Top