|
|
|
#1 (permalink) | |||||||||||||
|
PC Gamer
|
I have java 1.6 on my computer, and I can use it like this in command line:
C:\program files\java\blahblah\bin\javac filename.java I know I can do just javac and java commands from the folder where my script is in. How can I set up my computer to do this? For example: cd C:\blahlblah\Desktop\ javac myprogram.java java myprogram ???
__________________
[CS:S Gun Game (ADMIN)] [My CPU-Z] [FAQ - How to make a portable USB charger] [OCN Wallpapers] [OCN Wallpapers 2] [OCN Wallpapers 3]
|
|||||||||||||
|
|
|
|
#2 (permalink) | ||||||||||||||
|
Intel Overclocker
|
why not use an IDE?
BlueJ is what we use in school.
__________________
Quote:
SLi Zone PSU listing- check to see if your PSU is SLi certified. BF2 stats BF2142 stats My Guide to BF2 Unlocks
|
||||||||||||||
|
|
|
|
#3 (permalink) | |||||||||||||
|
PC Gamer
|
Ok I'm just learning Java, so this may sound noobish, but would I make an exe for the program? Now in school we just started and are compiling/running in console (mac). how would I run a .class file in windows?
for an IDE - I know I can use one, but I have the above question of running .class Btw, I'm not a total noob, I know C++ and web languages.
__________________
[CS:S Gun Game (ADMIN)] [My CPU-Z] [FAQ - How to make a portable USB charger] [OCN Wallpapers] [OCN Wallpapers 2] [OCN Wallpapers 3]
|
|||||||||||||
|
|
|
|
#4 (permalink) | ||||||||||||||
|
Intel Overclocker
|
hmm... i was just thinking of a slightly easier way. i AM a noob.
__________________
Quote:
SLi Zone PSU listing- check to see if your PSU is SLi certified. BF2 stats BF2142 stats My Guide to BF2 Unlocks
|
||||||||||||||
|
|
|
|
#5 (permalink) | ||||||||||||||
|
Photography nut
![]() |
As far as I know you cannot run the .class files, only the .java file with the main method in it. If you move to that directory where the files are located then you should be able to run the commands:
javac myprogram.java java myprogram You'll notice that the .class files are created are you javac myprogram.java Look at screenshot.
__________________
"UNIX was never designed to keep people from doing stupid things, because that policy would also keep them from doing clever things." - Doug Gwyn Try out the latest Programming Challenge Quote:
CPU-Z Validation @ 2.97-prime95 stable 16 hours @ 1.48v Proof | CPU-Z Validation @ 3.15 Getting Mouse Side Buttons to work in Linux, Compile a custom Kernel, More
Last edited by dangerousHobo : 01-23-07 at 10:51 AM. |
||||||||||||||
|
|
|
|
#6 (permalink) | ||||||||||||
|
110100001101001111000
|
You have to adjust your PATH variable.
Hold WindowsKey + Pause/Break to bring up system properties Go to Advanced tab Click Environmental Variables Go down to PATH and add your C:\program files\java\blahblah\bin\ directory to the path Make sure you put ; between the old path and this new one Now go to your .java file directory and javac and java should work globally.
__________________
|
||||||||||||
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|