Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Hello World this week in the Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Bear Bibeault
  • Liutauras Vilda
  • Devaka Cooray
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Running java applications

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how do you run an application properly when using your H drive?

I know it's kinda like this:

H:\directoryname\filename>javac Example_1_1.java
H:\directoryname\filename>java Example_1_1

like for example if i was to call my directory Java and my file name Example_1_1 would it look something like this:

H:\Java\Example_1_1>javac Example_1_1.java
H:\Java\Example_1_1>java Example_1_1

oh and do i need to change directory at the start in order to work from my H drive?
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That looks like a good start. You need to make your "current directory" the parent of a set of directories that match your package statements. If you didn't specify a package then your current directory contains the source files. I think that's what you're up to.

See if this tutorial makes this clearer.
 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
surprised stan didn't bust down on your fun name, never heard of anyone named "Fishy" before, although gwen paltro named her kid "Apple" and Frank zappa named his kid "Moon Unit"..so i guess nothing would surpirse me nowadays.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Right... :roll:

"Fishy Cakes", have you read the JavaRanch policy on forum names? Please change your name.

All JavaRanch users are asked to use a real name as their display name, with a first and last name, and maybe more, separated by spaces. Obviously fictitious names may be locked out. By "real name", we mean either your own actual, personal name, or a name that at least looks like it could belong to a real person. No names of celebrities or fictional characters. No cute nicknames like "javarulz" or "Hacker King". No joke names like "Adam Baum" (atom bomb) or "Justin Case" (just in case). No names with embedded numbers or other unorthodox punctuation like "Mike505" or "John_Smith". No names of companies - just people.
 
I’m tired of walking, and will rest for a minute and grow some wheels. This is the promise of this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!