File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I'm having trouble with Java 1.6

 
Jay Dilla
Ranch Hand
Posts: 201
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to compile and run a test program from the command window.
In order for it to work I have to put the entire directory location and "HelloWorld.java" at the C prompt.
Is there something wrong with 1.6 that I can not simply use "javac HelloWorld.java" and "java HelloWorld"?

I have to input:
C:\Program Files\Java\jdk1.6.0\bin>javac c:\JavaProjects\HelloWorld2.java

C:\Program Files\Java\jdk1.6.0\bin>java HelloWorld2
Hello, World

for it to work!!!
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Welcome to JavaRanch!

We have a strict policy on display names, which must be a real first and last name with a space between.

Please go here and fix your display name up, pronto. Thanks, pardner!

As far as your "problem" -- the argument to javac is and has always been a path to a file, relative to the current directory. This is nothing new with JDK 1.6.

You might find this helpful, as well as this. A properly configured system makes working with Java much easier.
 
Jay Dilla
Ranch Hand
Posts: 201
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ernest this is not your jurisdiction according to the moderator list.
Thanks, so I guess all this time when I simply input javac helloworld.java it has already been set up for me.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by dawud alexander:
Ernest this is not your jurisdiction according to the moderator list.


Here's another link for you.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic