• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

knb page# 793 doubt.

 
Ranch Hand
Posts: 400
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


its giving me following error and i have jdk6 installed.
===
javac: file not found: com\wickedlysmart\MyClass.java
Usage: javac <options> <source files>
use -help for a list of possible options

but in book page# 793 the error message is different!


Note: i have give wrong value to -d param "classes1" which is not available onto file system and while compiling through "javac -d ../classes com/wickedlysmart/MyClass.java" its just compiling fine, no error.
 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Minhaj kaimkhani wrote:

its giving me following error and i have jdk6 installed.
===
javac: file not found: com\wickedlysmart\MyClass.java
Usage: javac <options> <source files>
use -help for a list of possible options

but in book page# 793 the error message is different!


Note: i have give wrong value to -d param "classes1" which is not available onto file system and while compiling through "javac -d ../classes com/wickedlysmart/MyClass.java" its just compiling fine, no error.




Hi , I am getting the following message while compiling like you. instead of classes i am using classes1 which doesn't exist. I think this is similar to what book mention. I have JDK5.

C:\myProject\source> javac -d ../classes1 com/wickedlysmart/MyClass.java
com/wickedlysmart/MyClass.java:2: error while writing com.wickedlysmart.MyClass:
..\classes1\com\wickedlysmart\MyClass.class (The system cannot find the path sp
ecified)
public class MyClass{
^
1 error
 
Rajiv Chopra
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rajiv Chopra wrote:

Minhaj kaimkhani wrote:

its giving me following error and i have jdk6 installed.
===
javac: file not found: com\wickedlysmart\MyClass.java
Usage: javac <options> <source files>
use -help for a list of possible options

but in book page# 793 the error message is different!


Note: i have give wrong value to -d param "classes1" which is not available onto file system and while compiling through "javac -d ../classes com/wickedlysmart/MyClass.java" its just compiling fine, no error.




Hi , I am getting the following message while compiling like you. instead of classes i am using classes1 which doesn't exist. I think this is similar to what book mention. I have JDK5.

C:\myProject\source> javac -d ../classes1 com/wickedlysmart/MyClass.java
com/wickedlysmart/MyClass.java:2: error while writing com.wickedlysmart.MyClass:
..\classes1\com\wickedlysmart\MyClass.class (The system cannot find the path sp
ecified)
public class MyClass{
^
1 error





I changed my JDK to 1.6 now message is same like in book.

C:\>java -version
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode)

C:\>cd myProject

C:\myProject>cd source

C:\myProject\source>javac -d ../classes1 com/wickedlysmart/MyClass.java
javac: directory not found: ../classes1
Usage: javac <options> <source files>
use -help for a list of possible options
 
author
Posts: 23956
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@Rajiv

I am not entirely sure of the reason why you are trying to reproduce the issue. The original poster of this topic already mentioned that the issue was found, and that it compiles now...



 
Rajiv Chopra
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Henry Wong wrote:@Rajiv

I am not entirely sure of the reason why you are trying to reproduce the issue. The original poster of this topic already mentioned that the issue was found, and that it compiles now...




Hi,

Issue is he is not getting the right error message if he provide wrong direcotry name. Error should say directory not found but he is getting file not found what he is trying to compile.

If directory exists he compiles just fine.
But if directory not exists he is getting different message than book.( thats why i was compiling on my system and I am getting similar answer as on book).
 
Minhaj Mehmood
Ranch Hand
Posts: 400
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Henry Wong wrote:@Rajiv
I am not entirely sure of the reason why you are trying to reproduce the issue. The original poster of this topic already mentioned that the issue was found, and that it compiles now...



Henry, No issue is not found still -- the error message I'm getting is totally different than mentioned in book..
 
Rajiv Chopra
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Minhaj kaimkhani wrote:

Henry Wong wrote:@Rajiv
I am not entirely sure of the reason why you are trying to reproduce the issue. The original poster of this topic already mentioned that the issue was found, and that it compiles now...



Henry, No issue is not found still -- the error message I'm getting is totally different than mentioned in book..



can you let me know the version of java you are using.
C:\>java -version

you can see what version i am using and what I am getting above.
 
Minhaj Mehmood
Ranch Hand
Posts: 400
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes its java6.

$>java -version
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing)
 
Rajiv Chopra
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Minhaj kaimkhani wrote:yes its java6.

$>java -version
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing)



hey you are using Unix enviornment thats why ../ is not working.
change the directory name to anything that is not there like classes you will get direcctory not found error.
$ javac -d classes1 com/wickedlysmart/MyClass.java
javac: directory not found: classes1
Usage: javac <options> <source files>
use -help for a list of possible options
 
moose poop looks like football shaped elk poop. About the size of this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic