• Post Reply Bookmark Topic Watch Topic
  • New Topic

"jar cvf classes.jar classes.class" is not correct?  RSS feed

 
Dragon Liu
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use "jar cvf Test.jar Test.class" to build the jar file.
but when I use java -jar Test.jar ,Some error occured!
(I am now in the director where the jar file locate.)
the error info is :"Failed to load Main-Class manifest attribute from Test.jar "
help please. I cann't resove it!
 
Paul Stevens
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What part of the test is this on?
 
Dragon Liu
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul Stevens:
Thanks for your responses first.
the Test.java is very simple.
public class Test{
public static void main(String[] args){
System.out.println("hello,world");
}
}
 
Jane Griscti
Ranch Hand
Posts: 3141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Dragon,
I'm going to move this over to Other Java API. This forum is only for questions directly relating to the SCJP exam.
------------------
Jane Griscti
Sun Certified Programmer for the Java� 2 Platform
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!