Solved

JBuilder X

Posted on 2004-09-09
18
404 Views
Last Modified: 2013-11-23
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
Comment
Question by:Toynbert
18 Comments
 
LVL 24

Assisted Solution

by:HemanthaKumar
HemanthaKumar earned 20 total points
ID: 12021153
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
 

Author Comment

by:Toynbert
ID: 12023229
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
 
LVL 1

Expert Comment

by:Comp_Tekk
ID: 12024030
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
 
LVL 18

Expert Comment

by:armoghan
ID: 12024229
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
 
LVL 18

Expert Comment

by:armoghan
ID: 12024234
I am currenly working on JBuilderX, you can ask me questions about it :)
0
 
LVL 6

Expert Comment

by:valipotor
ID: 12024649
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
 
LVL 18

Expert Comment

by:armoghan
ID: 12024751
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
 
LVL 18

Expert Comment

by:armoghan
ID: 12024758
and installing it on c:\Jbuilderx instead of Program Files
0
 

Author Comment

by:Toynbert
ID: 12036098
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 18

Expert Comment

by:armoghan
ID: 12040873
Your JRE is in Path but not JDK
0
 

Author Comment

by:Toynbert
ID: 12041141
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
 
LVL 18

Expert Comment

by:armoghan
ID: 12041183
Try setting
JAVA_HOME, CLASSPATH and PATH variables
0
 

Author Comment

by:Toynbert
ID: 12061540
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
 
LVL 18

Expert Comment

by:armoghan
ID: 12061610
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
 

Author Comment

by:Toynbert
ID: 12061947
you use winCVS, is that the best for CVS?
0
 
LVL 18

Expert Comment

by:armoghan
ID: 12062399
for windows I think it is the best
0
 
LVL 18

Accepted Solution

by:
armoghan earned 80 total points
ID: 12062429
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
 

Author Comment

by:Toynbert
ID: 12062561
thank you guys, that really helped.
if I have any more questions on java compilation I know who to ask.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Java 1603 Error 3 45
Updating Java 9 87
countAbc challenge 9 50
countHi2 challenge 7 44
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn how to implement Singleton Design Pattern in Java.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now