Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 451
  • Last Modified:

JBuilder X

alright, I am working on a windows box, I want an IDE that has:
checkstyle
CVS
ant
which JBuilder has.
however JBuilder is not letting me edit/compile a single file.
for example....
the classic hello world doesn't work!

in HelloWorld.java:

public class HelloWorld {

    public static void main(String[] args) {
        System.out.println("Hello world!");
    }
}




I get this error:
"C:\Program Files\JBuilderX\jdk1.4\bin\javaw" -classpath "C:\Documents and Settings\Tony\jbproject\classes;C:\Program Files\JBuilderX\jdk1.4\demo\jfc\Java2D\Java2Demo.jar;C:\Program Files\JBuilderX\jdk1.4\demo\plugin\jfc\Java2D\Java2Demo.jar;C:\Program Files\JBuilderX\jdk1.4\jre\javaws\javaws.jar;C:\Program Files\JBuilderX\jdk1.4\jre\lib\charsets.jar;C:\Program Files\JBuilderX\jdk1.4\jre\lib\ext\dnsns.jar;C:\Program Files\JBuilderX\jdk1.4\jre\lib\ext\ldapsec.jar;C:\Program Files\JBuilderX\jdk1.4\jre\lib\ext\localedata.jar;C:\Program Files\JBuilderX\jdk1.4\jre\lib\ext\sunjce_provider.jar;C:\Program Files\JBuilderX\jdk1.4\jre\lib\im\indicim.jar;C:\Program Files\JBuilderX\jdk1.4\jre\lib\im\thaiim.jar;C:\Program Files\JBuilderX\jdk1.4\jre\lib\jce.jar;C:\Program Files\JBuilderX\jdk1.4\jre\lib\jsse.jar;C:\Program Files\JBuilderX\jdk1.4\jre\lib\plugin.jar;C:\Program Files\JBuilderX\jdk1.4\jre\lib\rt.jar;C:\Program Files\JBuilderX\jdk1.4\jre\lib\sunrsasign.jar;C:\Program Files\JBuilderX\jdk1.4\lib\dt.jar;C:\Program Files\JBuilderX\jdk1.4\lib\htmlconverter.jar;C:\Program Files\JBuilderX\jdk1.4\lib\tools.jar"  HelloWorld
java.lang.NoClassDefFoundError: HelloWorld

Exception in thread "main"


if anyone who uses JBuilder can tell me how to get around its apparent dependance on projects
or if anyone has another windows IDE preference. let me know.  I've used eclipse, and didn't like its file navigation.
0
Toynbert
Asked:
Toynbert
2 Solutions
 
HemanthaKumarCommented:
Add current working dir (.) or any other directory where you store the project files (in this case helloworld.java) to classpath environment variable ..

Goto Mycomputer properties and advanced..environment variables

~Hemanth
0
 
ToynbertAuthor Commented:
that doesn't seem to do anything, or maybe I'm setting it wrong....

CLASSPATH= "C:\Program Files\Java\j2re1.4.2_05\lib\ext\QTJava.zip";"C:\Documents and Settings\Tony\Desktop\cs2335"

the second one I added, and that's what the file is in...
it still doesn't compile right.
0
 
Comp_TekkCommented:
Try pointing the classpath to C:\Program Files\Java\j2re1.4.2_05\bin\

That has the location of all the javac, java, etc files used to compile and run java files

JBuilder should have a configuration option that tells it where the SDK is located.  I haven't used JBuilder X but I know JBuilder 8 allowed you to change the path of the location of the sdk files.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
armoghanCommented:
The code is perfectly fine and if yuo created project from Menu New Project and Add a class file and name it HelloWorld, By default it will put it in the package with which you have named the project

e.g. if the project name is xyz the class package will be by default in
package xyz;
public class HelloWorld {

    public static void main(String[] args) {
        System.out.println("Hello world!");
    }
}

If this does not work
Try running simple projects from Sample projects
0
 
armoghanCommented:
I am currenly working on JBuilderX, you can ask me questions about it :)
0
 
valipotorCommented:
This is not a compile error .... it just doesn't find the class to execute .... i get the same error if the class is in default package (i mean it has no package directive it the file).

Do you know why armoghan ?
0
 
armoghanCommented:
I have uploaded a project with the code pasted above here
http://www.armoghan.com/untitled7.zip

It works fine with me. download it and see if it works with you..
If doesnot work, then there is problem with the JDK Path or you may need to reinstall the JBuilderX
0
 
armoghanCommented:
and installing it on c:\Jbuilderx instead of Program Files
0
 
ToynbertAuthor Commented:
Alright, new question,
I have scrapped JBuilder, I'm going to do eclipse again because it is supported by my school.

anyway, I have a problem, I can go to console and type java -version and get the version info...

but when I try to compile something, it says that javac is unrecognised.
what's up with that?
0
 
armoghanCommented:
Your JRE is in Path but not JDK
0
 
ToynbertAuthor Commented:
so how do I get the jdk in the path, what file or program should I be looking for to put in the path?  because the path right now is pointing to the folder with javac.exe in it.
0
 
armoghanCommented:
Try setting
JAVA_HOME, CLASSPATH and PATH variables
0
 
ToynbertAuthor Commented:
alright, I fixed everything,  <it may have to have me doing console "set CLASSPATH=." every time I try to compile though.
now, if I have a CVS repository project,
how do I checkout correctly, make a new file, addit tto the project and commit the cvs
and have my partners see it all correctly,
currently, they are telling me that all my CVS updating is going straight to attic, yet the checkout sees it fine.


and I think this questiong is pretty much done...  this one's for the money, who tells me this should also include how to give them points?
0
 
armoghanCommented:
I use CVS separately as I was using Project Group option and it has some problems with CVS updation,
When I update a file I commit it from the WinCVS
Similarly if I add a file I add it through WinCVS and then commit is from there.

>>>who tells me this should also include how to give them points?
You can increase the points and Accept best answered your question
0
 
ToynbertAuthor Commented:
you use winCVS, is that the best for CVS?
0
 
armoghanCommented:
for windows I think it is the best
0
 
armoghanCommented:
Otherwise you need to learn quite many commands to use from commandline
http://sourceforge.net/docman/display_doc.php?docid=14033&group_id=1

For winCVS
http://www.wincvs.org/download.html
0
 
ToynbertAuthor Commented:
thank you guys, that really helped.
if I have any more questions on java compilation I know who to ask.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now