Comment compiler du java???
Solved
Julie
-
audrey -
audrey -
Hello!
I just installed Java Runtime Environment 1.5 on Windows XP, but I can't seem to compile anything!!! Can someone please provide me with precise instructions on how to do it???
I'm a computer science student and I need Java, but I can't even get it to work!!!
Thanks in advance for your help,
Julie
I just installed Java Runtime Environment 1.5 on Windows XP, but I can't seem to compile anything!!! Can someone please provide me with precise instructions on how to do it???
I'm a computer science student and I need Java, but I can't even get it to work!!!
Thanks in advance for your help,
Julie
24 answers
- 1
- 2
Next
Hello,
I uninstalled jdk
Without jdk, no Java programming!
The jdk installer is the same as all those found under Microsoft Windows(tm). You just need to click "next" to move from one screen to another.
After installation, you end up with a directory that contains the Java programs and libraries, for example
c:\jdk1.5.0_05
Then you need to manually finish the installation by modifying two environment variables:
PATH which allows access to the jdk executables from a command prompt and CLASSPATH which indicates the list of directories containing the Java libraries.
The end of PATH should look something like this:
PATH=;[drive:]\[jdk installation directory]\bin
and for the other variable:
CLASSPATH=.;[drive:]\[jdk installation directory]\lib
for example:
PATH=;c:\jdk1.5.0_05\bin
CLASSPATH=.;c:\jdk1.5.0_05\lib
(Don't forget the dot at the beginning of the line for CLASSPATH)
To test the changes, you need to type in the console:
>echo %PATH%
and
>echo %CLASSPATH%
(This needs to be confirmed because I don't use Microsoft Windows(tm), so I'm saying this from memory)
For more help, after installing the jdk, can you provide:
- the jdk installation directory
- the values of the environment variables
Good luck,
Philippe.
--
--- O Espírito da Liberdade ---
I uninstalled jdk
Without jdk, no Java programming!
The jdk installer is the same as all those found under Microsoft Windows(tm). You just need to click "next" to move from one screen to another.
After installation, you end up with a directory that contains the Java programs and libraries, for example
c:\jdk1.5.0_05
Then you need to manually finish the installation by modifying two environment variables:
PATH which allows access to the jdk executables from a command prompt and CLASSPATH which indicates the list of directories containing the Java libraries.
The end of PATH should look something like this:
PATH=;[drive:]\[jdk installation directory]\bin
and for the other variable:
CLASSPATH=.;[drive:]\[jdk installation directory]\lib
for example:
PATH=;c:\jdk1.5.0_05\bin
CLASSPATH=.;c:\jdk1.5.0_05\lib
(Don't forget the dot at the beginning of the line for CLASSPATH)
To test the changes, you need to type in the console:
>echo %PATH%
and
>echo %CLASSPATH%
(This needs to be confirmed because I don't use Microsoft Windows(tm), so I'm saying this from memory)
For more help, after installing the jdk, can you provide:
- the jdk installation directory
- the values of the environment variables
Good luck,
Philippe.
--
--- O Espírito da Liberdade ---
adi
Désolé, je ne peux pas vous aider avec ça.
Emna
You will find it in Control Panel/System/Advanced/Environment Variables/new or modify if it already exists.
audrey
you’re saving my life too! Thank you!
Yes, exactly, likewise, Netbeans is not necessary, it's just a "development environment."
Personally, I prefer Eclipse (http://www.eclipse.org), but that's a matter of taste!
Philippe.
--
--- O Spirit of Freedom ---
Personally, I prefer Eclipse (http://www.eclipse.org), but that's a matter of taste!
Philippe.
--
--- O Spirit of Freedom ---
Try to see Eclipse as an enhanced text editor, with the ability to execute certain predefined or non-predefined actions.
Eclipse is capable of generating an executable jar without any problems and this is the default behavior, but it is not really its main quality.
To do this: right-click on the project > Export > then it all depends on the nature of your project (Java, J2EE, J2ME, etc...)
--
Grumpy bear
Eclipse is capable of generating an executable jar without any problems and this is the default behavior, but it is not really its main quality.
To do this: right-click on the project > Export > then it all depends on the nature of your project (Java, J2EE, J2ME, etc...)
--
Grumpy bear
look here:
http://www.commentcamarche.net/forum/affich-1371943-%5Bjava%5D-compiler-avec-Windows
there have been other posts in the programming forum about this, if you search a bit you should find the solution to your problem :)
--
http://www.commentcamarche.net/forum/affich-1371943-%5Bjava%5D-compiler-avec-Windows
there have been other posts in the programming forum about this, if you search a bit you should find the solution to your problem :)
--
And a time for every thing under heaven ...
Hello,
The JRE is not enough to compile Java, you need the SDK:
https://jsecom16b.sun.com/ECom/EComActionServlet;jsessionid=E5B903C02F760BE2284B1C2431995DCB
Philippe.
--
--- O Espirito da Liberdade ---
The JRE is not enough to compile Java, you need the SDK:
https://jsecom16b.sun.com/ECom/EComActionServlet;jsessionid=E5B903C02F760BE2284B1C2431995DCB
Philippe.
--
--- O Espirito da Liberdade ---
Ok, thanks but then it's up to me... I installed the JRE, the SDK, set the environment variable... what else do I need to do for it to work? :((
Everything is detailed here:
http://java.sun.com/docs/books/tutorial/index.html
for different operating systems
Happy reading,
Philippe.
--
--- O Espírito da Liberdade ---
http://java.sun.com/docs/books/tutorial/index.html
for different operating systems
Happy reading,
Philippe.
--
--- O Espírito da Liberdade ---
I’m starting to believe that I’m cursed:
I followed everything as indicated on
http://java.sun.com/docs/books/tutorial/index.html
and... it's not working, I can't compile anything at all!!!
Could there be a subtlety that someone has hidden from me against my will???
Please, HELP ME!!!
I followed everything as indicated on
http://java.sun.com/docs/books/tutorial/index.html
and... it's not working, I can't compile anything at all!!!
Could there be a subtlety that someone has hidden from me against my will???
Please, HELP ME!!!
so:
I installed NetBeans
I installed JRE, JDK
I uninstalled JDK
I couldn't uninstall NetBeans
I reinstalled JDK
I can neither open nor uninstall NetBeans (it tells me it can't find "java.exe" while I can find it!)
And I uninstalled JDK, and I've given up for now!!!
I installed NetBeans
I installed JRE, JDK
I uninstalled JDK
I couldn't uninstall NetBeans
I reinstalled JDK
I can neither open nor uninstall NetBeans (it tells me it can't find "java.exe" while I can find it!)
And I uninstalled JDK, and I've given up for now!!!
You need to set the JAVA_HOME paths; it’s the only way by adding an environment variable. Otherwise, you can also use an API like NetBeans or Eclipse to compile. :)
--
--
And a time for every purpose under heaven ...
why don't you use an API like netbeans that comes with the sdk to compile?
--
--
And a time for every thing under heaven ...
Hi
I was going to say that
Julie!, uninstall properly and install correctly
--
Why don't you use an API like NetBeans which comes with the SDK to compile?posted by Galsungen
I was going to say that
Julie!, uninstall properly and install correctly
--
limit
Read, write, and count properly without being an outlaw? >> It's obviously OpenOffice
Hello
Huh? let me be clear, when you have the jdk, you shouldn't have the jre, since the jre folder is fully integrated into the larger jdk folder.
?
--
Read, write, and count properly without being a lawbreaker?
>> It's obviously OpenOffice
Added by Julie (11/13/2005 at 10:15 AM GMT+1) so: I installed netbeans I installed jre, jdk I uninstalled jdk I couldn't uninstall netbeans I reinstalled jdk I can neither open nor uninstall netbeans (it tells me it can't find "java.exe" while I can find it!) and I uninstalled jdk, and I gave up for now!
Huh? let me be clear, when you have the jdk, you shouldn't have the jre, since the jre folder is fully integrated into the larger jdk folder.
?
--
Read, write, and count properly without being a lawbreaker?
>> It's obviously OpenOffice
Yes, that's it, but personally I was "struggling" a bit, I downloaded a bit of anything in any way!!! lol and everything is back to normal now!! :)
Hello, I'm trying to do my first programming in Java since I have an interview and I have never programmed in Java before, but the problem is that I can't compile.
I go to the hello folder and compile with javac hello.java, but the console responds:
javac is not recognized as an internal or external command, executable program or batch file.
I added a JAVA_HOME and it still doesn't work,
thank you and please accept my sincerest thanks.
I go to the hello folder and compile with javac hello.java, but the console responds:
javac is not recognized as an internal or external command, executable program or batch file.
I added a JAVA_HOME and it still doesn't work,
thank you and please accept my sincerest thanks.
Hello,
You need to add the path to javac to the machine's path. Everything is explained in the tutorials above.
--
Regards.
You need to add the path to javac to the machine's path. Everything is explained in the tutorials above.
--
Regards.
Hello, I changed the path and classpath as required. I previously had the same message as Julie. Now when I compile a .java file, I get javac: file not found, even though I have this .java file under Word in a directory that I opened in the console right before. Does anyone know where the problem comes from?
- 1
- 2
Next