Overclock.net - Overclocking.net
     
 
Home Gallery Reviews Blogs Register Today's Posts Mark Forums Read Members List


Go Back   Overclock.net - Overclocking.net > Software, Programming and Coding > Coding and Programming

Reply
 
LinkBack Thread Tools
Old 01-22-07   #1 (permalink)
PC Gamer
 
Boris4ka's Avatar
 
intel nvidia

Join Date: Mar 2006
Location: San Francisco, CA
Posts: 2,871
Blog Entries: 2

Rep: 195 Boris4ka is acknowledged by manyBoris4ka is acknowledged by many
Unique Rep: 157
Trader Rating: 17
Question java environment

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

???

System: über pwnage
CPU
E6600 3.0GHz 1.4v
Motherboard
Gigabyte GA-P35-S3L
Memory
2x2GB G.Skill 6400 835MHz
Graphics Card
EVGA 8800GTS 320MB
Hard Drive
320GB .10 + 80GB .7
Sound Card
Onboard HD Audio
Power Supply
Rosewill Performance 550W
Case
Centurion 5 w/ side window
CPU cooling
Golden Orb 2 - lapped
GPU cooling
Stock fan
OS
Vista Ultimate x64
Monitor
X191W 19"w + Sony 15" LCDs
Boris4ka is offline Boris4ka's Gallery   Reply With Quote
Old 01-22-07   #2 (permalink)
Intel Overclocker
 
cgrado's Avatar
 
intel nvidia

Join Date: Feb 2006
Location: Sugar Land, Texas
Posts: 4,965

Rep: 229 cgrado is acknowledged by manycgrado is acknowledged by manycgrado is acknowledged by many
Unique Rep: 175
FAQs Submitted: 1
Folding Team Rank: 254
Hardware Reviews: 1
Trader Rating: 1
Default

why not use an IDE?
BlueJ is what we use in school.
__________________
Quote:
Originally Posted by TwIsTeDbOi View Post
What's next, banning mirrors because, oh no god forbid, if we see ourselves naked we're gunna be traumatized?
I'm like the inquirer, take everything i say with a grain of salt.
SLi Zone PSU listing- check to see if your PSU is SLi certified.
BF2 stats BF2142 stats
My Guide to BF2 Unlocks

System: Immortal
CPU
E6600 44G 3.240GHz
Motherboard
Asus P5B-deluxe
Memory
2GB PQIturbomem 667(800mhzballistix soon)
Graphics Card
eVGA 8800GT (650/950)
Hard Drive
1x 400GB Seagate 7200rpm/16mb cache
Sound Card
X-fi Xtremegamer
Power Supply
610w PCP&C silencer
Case
TTArmor w/side fan
CPU cooling
Custom Watercooling
GPU cooling
Stock EVGA
OS
Windows XP Home/Ubuntu
Monitor
NEC MultiSync LCD1970GX
cgrado is offline I fold for Overclock.net cgrado's Gallery   Reply With Quote
Old 01-23-07   #3 (permalink)
PC Gamer
 
Boris4ka's Avatar
 
intel nvidia

Join Date: Mar 2006
Location: San Francisco, CA
Posts: 2,871
Blog Entries: 2

Rep: 195 Boris4ka is acknowledged by manyBoris4ka is acknowledged by many
Unique Rep: 157
Trader Rating: 17
Default

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.

System: über pwnage
CPU
E6600 3.0GHz 1.4v
Motherboard
Gigabyte GA-P35-S3L
Memory
2x2GB G.Skill 6400 835MHz
Graphics Card
EVGA 8800GTS 320MB
Hard Drive
320GB .10 + 80GB .7
Sound Card
Onboard HD Audio
Power Supply
Rosewill Performance 550W
Case
Centurion 5 w/ side window
CPU cooling
Golden Orb 2 - lapped
GPU cooling
Stock fan
OS
Vista Ultimate x64
Monitor
X191W 19"w + Sony 15" LCDs
Boris4ka is offline Boris4ka's Gallery   Reply With Quote
Old 01-23-07   #4 (permalink)
Intel Overclocker
 
cgrado's Avatar
 
intel nvidia

Join Date: Feb 2006
Location: Sugar Land, Texas
Posts: 4,965

Rep: 229 cgrado is acknowledged by manycgrado is acknowledged by manycgrado is acknowledged by many
Unique Rep: 175
FAQs Submitted: 1
Folding Team Rank: 254
Hardware Reviews: 1
Trader Rating: 1
Default

hmm... i was just thinking of a slightly easier way. i AM a noob.
__________________
Quote:
Originally Posted by TwIsTeDbOi View Post
What's next, banning mirrors because, oh no god forbid, if we see ourselves naked we're gunna be traumatized?
I'm like the inquirer, take everything i say with a grain of salt.
SLi Zone PSU listing- check to see if your PSU is SLi certified.
BF2 stats BF2142 stats
My Guide to BF2 Unlocks

System: Immortal
CPU
E6600 44G 3.240GHz
Motherboard
Asus P5B-deluxe
Memory
2GB PQIturbomem 667(800mhzballistix soon)
Graphics Card
eVGA 8800GT (650/950)
Hard Drive
1x 400GB Seagate 7200rpm/16mb cache
Sound Card
X-fi Xtremegamer
Power Supply
610w PCP&C silencer
Case
TTArmor w/side fan
CPU cooling
Custom Watercooling
GPU cooling
Stock EVGA
OS
Windows XP Home/Ubuntu
Monitor
NEC MultiSync LCD1970GX
cgrado is offline I fold for Overclock.net cgrado's Gallery   Reply With Quote
Old 01-23-07   #5 (permalink)
Photography nut
 
dangerousHobo's Avatar
 
amd nvidia

Join Date: Dec 2005
Location: ~/
Posts: 3,469

FAQs Submitted: 7
Folding Team Rank: 390
Trader Rating: 0
Default

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.
Attached Thumbnails
java-environment-snapshot8.jpg  
__________________
"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:
Originally Posted by Melcar
Only one reasonable way to solve this... a dance off.

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

System: Anomaly
CPU
Athlon 3700 SD(KACAE)0546 @3.02ghz
Motherboard
DFI UT nF4 Ultra-D
Memory
G.Skill 2x512 UTT(BH-5)
Graphics Card
evga 6800gs
Hard Drive
Maxtor 300GB + WD 250GB
Sound Card
onboard
Power Supply
Ultra 500w V-series
Case
one from Ultra
CPU cooling
Big Typhoon
GPU cooling
80mm fan mounted on
OS
Arch64
Monitor
Acer AL2216W 22" WS LCD

Last edited by dangerousHobo : 01-23-07 at 10:51 AM.
dangerousHobo is offline I fold for Overclock.net Overclocked Account dangerousHobo's Gallery   Reply With Quote
Old 01-23-07   #6 (permalink)
110100001101001111000
 
C-bro's Avatar
 
intel nvidia

Join Date: Jan 2006
Location: Hamilton, ON
Posts: 1,832

Rep: 283 C-bro is a proven memberC-bro is a proven memberC-bro is a proven member
Unique Rep: 215
FAQs Submitted: 6
Folding Team Rank: 237
Hardware Reviews: 9
Trader Rating: 1
Default

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.

System: RAID0R
CPU
Intel E2180 3.33GHz
Motherboard
Asus P5K-E/WIFI-AP vMod
Memory
2GB Kingmax DDR2-1066
Graphics Card
EVGA 8800GT
Hard Drive
2x250GB WD+500GB 7200.11
Sound Card
SB Audigy 2
Power Supply
Corsair CMPSU-550VX
CPU cooling
Arctic Cooling Freezer 7 Pro
GPU cooling
Zalman VF900-Cu
OS
Windows Vista Business 32-Bit
Monitor
HP F2105 21" & Samsung 712N
C-bro is offline I fold for Overclock.net Overclocked Account C-bro's Gallery   Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools



All times are GMT -4. The time now is 12:49 PM.


Overclock.net is a Carbon Neutral Site Creative Commons License Internet Security By ControlScan

Terms of Service / Forum Rules | Privacy Policy | Advertising | Become an Official Vendor
Copyright © 2008 Shogun Interactive Development. Most rights reserved.
Page generated in 0.34211 seconds with 9 queries