Big Problems with my last Update

I have installed the J2SE Development kit on my XP machine, I've also installed the Netbeans 4.1 IDE. I tried to compile a simple java program and I got an error message, when I clicked Debug it gave me Visual Studio which seemed to have problems understanding java. I've since removed Visual Studio and I still get the error message but I'm told that there is no debugger. Please Please Please Help Me before I hurt somebody.

Thank you,

Hugh O'Neil.

[473 byte] By [saxmachinea] at [2007-11-27 6:11:40]
# 1

> I have installed the J2SE Development kit on my XP

> machine, I've also installed the Netbeans 4.1 IDE. I

> tried to compile a simple java program and I got an

> error message, when I clicked Debug it gave me Visual

> Studio which seemed to have problems understanding

> java. I've since removed Visual Studio and I still

> get the error message but I'm told that there is no

> debugger. Please Please Please Help Me before I hurt

> somebody.

>

> Thank you,

> Hugh O'Neil.

Can you explain a bit more? How did you get visual studio from Netbeans debugger?

Also if you have some error output it would help.

_helloWorld_a at 2007-7-12 17:18:06 > top of Java-index,Java Essentials,New To Java...
# 2

> I have installed the J2SE Development kit on my XP

> machine, I've also installed the Netbeans 4.1 IDE. I

> tried to compile a simple java program and I got an

> error message, when I clicked Debug it gave me Visual

> Studio which seemed to have problems understanding

> java.

Yeah no kidding.

Although I am fairly certain that it is trying to debug javac or something there. Which means that javac or the like is crashing.

Uninstall and reinstall.

cotton.ma at 2007-7-12 17:18:06 > top of Java-index,Java Essentials,New To Java...
# 3
After Unistaling and reinstaling I get this: 'Javac' is not recognized as an internal or external command, operable program or batch file. I need an answer that works, please help me. I wish I could talk vocally with someone.
saxmachinea at 2007-7-12 17:18:06 > top of Java-index,Java Essentials,New To Java...
# 4

> After Unistaling and reinstaling I get this: 'Javac'

> is not recognized as an internal or external command,

> operable program or batch file. I need an answer that

> works,

Dude, fucking relax please. You can be helped but if you make comments like that you are on your own.

My answer will work, you just didn't follow it correctly. What you mostly likely did was uninstall a JDK and install a JRE.

What exactly did you install?

cotton.ma at 2007-7-12 17:18:06 > top of Java-index,Java Essentials,New To Java...
# 5

OK, from a CD that came with a book "Programming with Java in 24 Hours" I installed: J2SE Development Kit (JDK 5.0) and Net Beans 4.1 IDE. Before my uninstall/reinstall the Dos prompt seemed to recognize Javac, afterwards it didn't. Does it leave some elements in the system that make it reinstall differently?

saxmachinea at 2007-7-12 17:18:06 > top of Java-index,Java Essentials,New To Java...
# 6

> OK, from a CD that came with a book "Programming with

> Java in 24 Hours" I installed: J2SE Development Kit

> (JDK 5.0) and Net Beans 4.1 IDE. Before my

> uninstall/reinstall the Dos prompt seemed to

> recognize Javac, afterwards it didn't. Does it leave

> some elements in the system that make it reinstall

> differently?

No. Okay that is likely your path then.

But before getting into that please find the directory in which it installed the JDK (should be under program files -> Java -> jdk something something)

Go into a cmd window and navigate into that directory and into the bin directory (which will be in that directory).

Then type

javac

and hit enter

We want to see here is your reinstall fixed the problem or if it continues to bomb out (aka launches Visual Studio debugger).

If it craps out then I suspect the JDK that came with your CD is broken. You can download the latest JDK from this site here

http://java.sun.com/javase/downloads/index.jsp (Download the thing called SE not the ME or EE ones)

If it does work then it is just a matter of fixing your path. I addressed this in the other thread.

cotton.ma at 2007-7-12 17:18:06 > top of Java-index,Java Essentials,New To Java...
# 7

This is what I got when I went through the path, I found the bin directory (javc.exe is in there) and I went there through the command line:

c:\Program Files\Java\jdk1.5.0_04\bin>javac

I hit enter and go this:

The system cannot find the path specified.

I then went and downloaded: Windows Platform - Java(TM) SE Development Kit 6 Update 1 jdk-6u1-windows-i586-p.exe, Installed it, and went through the command line again and got the same error.

I know I'm probably doing something wrong, but I'm too tifed to see it.

Thanks for your help.

saxmachinea at 2007-7-12 17:18:06 > top of Java-index,Java Essentials,New To Java...
# 8
My last reply didn't show the code and slash code in square brackets.
saxmachinea at 2007-7-12 17:18:06 > top of Java-index,Java Essentials,New To Java...
# 9

> This is what I got when I went through the path, I

> found the bin directory (javc.exe is in there) and I

> went there through the command line:

> c:\Program

> Files\Java\jdk1.5.0_04\bin>javac

> I hit enter and go this:

> The system cannot find the path specified.

I don't know what to say here. javac.exe should be in that bin directory. and path or no path it should be able to find it there.

All I can suggest is to fix your path as suggested in the other thread but copied here.

****************************

Control Panel -> System -> Advanced Tab -> Environment variables

one of the user variables will be PATH.

These instructions are for Windows (which I know you have) XP. If you have another version the steps will be different.

****************************

Then make sure you restart your machine after applying the path setting.

Then see what happens. If it still does not work then I sadly there is something gone wrong with your Windows installation. I am a little concerned that it didn't find the path (unless that was javac actually complaining) when you went into the bin folder.

I guess if you are still stuck then copy and past the exact error message here.

Don't know what else to tell you really. Sorry you are having these problems, if this is really fouled up as it sounds all I can say is that it is not normal.

cotton.ma at 2007-7-12 17:18:06 > top of Java-index,Java Essentials,New To Java...
# 10

Hello Hugh,

There are a couple of different issues conflated here. It sounds like your real goal is to compile and test Java code for your studies. Compiling with javac at a command prompt is only one way to do it. Your problem executing javac is worth resolving eventually, but does not need to hold you back from learning Java. You can use NetBeans to create, edit, test, and debug all kinds of Java applications entirely in the IDE's visual environment without ever seeing a command prompt.

NetBeans has advanced a lot since the 4.1 release. You really should get NB 5.5.1, just released last week. Since you've already installed the latest JDK 6u1, I recommend downloading NB 5.5.1 from http://www.netbeans.info/downloads/index.php. If you did not have the latest JDK, then I would recommend the JDK 6u1 with NetBeans 5.5.1 bundle from http://java.sun.com/javase/downloads/index.jsp.

When you start NetBeans, click the "Getting Started" link in the Welcome window for instructions for a "Hello World" program. Click the "Docs & Support" tab at http://www.netbeans.org for links to Learning Trails and NetBeans User Mailing Lists.

If you like the web forum format for user questions, see Nabble at http://www.nabble.com/NetbeansUsers-f2605.html.

vaughna at 2007-7-12 17:18:07 > top of Java-index,Java Essentials,New To Java...
# 11
Thanks Guys, I'm going to go with the Netbeans IDE solution. I'll go back to the command line problem at a later date. Sorry it took so long to get back to you, I've had a busy day. Thanks again for all your help, enjoy the rest of the weekend.
saxmachinea at 2007-7-12 17:18:07 > top of Java-index,Java Essentials,New To Java...