Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Running java applications

 
Fran Costigan
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?
 
Stan James
(instanceof Sidekick)
Ranch Hand
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.
 
luc comeau
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.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15284
39
Android IntelliJ IDE Java Scala Spring
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic