This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

knb page# 793 doubt.  RSS feed

 
Ranch Hand
Posts: 400
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
Sheriff
Posts: 23586
138
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • 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
  • 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 Java Spring
  • Mark post as helpful
  • send pies
  • 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
  • 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 Java Spring
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!