JavaRanch has a policy regarding names which can be found here. Since we try to have real or real-sounding names here, I am inclined to asked if Gohan Goku is indeed your real name, as I know Gohan and Goku are characters in a popular cartoon. If that is indeed your name that is fine, but I couldn't help but ask.
When I die, I want people to look at me and say "Yeah, he might have been crazy, but that was one zarkin frood that knew where his towel was."
. I created this project in eclipse and it compiles fine.
I tried compiling from command prompt using C:\Documents and settings\MyProject> javac -d build\classes src\com\*.java
And I got the error as error: cannot read: src\com\*.java
I dont know what went wrong. Can any one help me resolve this?
Joined: Oct 13, 2005
There is no such file as src/com/*.java You need another directory name in between.
Joined: Jan 29, 2010
I used javac -d build\classes src\com\mypackage\*.java src\com\mycontroller\*.java src\com\userinterface\*.java src
\com\mybean\*.java src\com\mybusiness\*.java src\com\myutil\*.java src\com\database\*.java for compiling and it worked.
Then I used echo Main-Class: com.mypackage.MyClass>manifest
Then jar cvf build\jar\gohan.jar manifest -C build\classes . .
I got a jar file. When I used java -jar build\jar\gohan.jar I get the following error
Failed to load Main-Class manifest attribute from
But when i use jar cfm build\jar\gohan.jar manifest -C build\classes ., I get the following error
java.io.IOException: invalid header field
Put the Oracle JAR file in a location relative to your JAR file, then add a Class-Path entry in your manifest. This entry should point to that JAR file using the relative path. For instance, if the Oracle JAR file is located in a folder called lib which in turn is located in the same folder as your JAR file:
Or if your JAR file and the Oracle JAR file are located in the same folder: