由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - how to add my own class into a jar file?
相关主题
菜鸟问题一问java dumb question
build.xml问个java on linux的奇怪问题
htmlunit中的classpath问题,总是找不到packageant javac error in eclipse 3.0?
请问mvn exec怎么把pom的jar加进去?请问一个最初级问题
CruiseControl: out of memory problemcom.sun.tools.javac.Main 问题
[转载] Urgent Help needed about Java Servlet?问个eclipse的问题
JBuilder questionJava fun
如何从java中调用MatlabIt's a Java Bug
相关话题的讨论汇总
话题: jar话题: file话题: my话题: add话题: use
进入Java版参与讨论
1 (共1页)
c**t
发帖数: 26
1
for example, the structure in the jar file is
edu.cc.ffm. The name of the jar file is bc.jar
suppose my java file is hell.java
at the beginning of hell.java, I add
package edu.cc.ffm;
then use javac -classpath bc.jar hell.java to get hell.class
next I extract bc.jar and move hell.class to edu\cc\ffm
finally use jar cf bc.jar *.* to create a new bc.jar
My question is, when I use import edu.cc.ffm.hell;
it generates error saying import arguments are not correct.
can any expert tell me what's wrong
1 (共1页)
进入Java版参与讨论
相关主题
It's a Java BugCruiseControl: out of memory problem
help "java.lang.NoSuchMethodError"[转载] Urgent Help needed about Java Servlet?
[合集] 请帮我看一下如何编译?JBuilder question
Re: 奇怪?? import找不到package如何从java中调用Matlab
菜鸟问题一问java dumb question
build.xml问个java on linux的奇怪问题
htmlunit中的classpath问题,总是找不到packageant javac error in eclipse 3.0?
请问mvn exec怎么把pom的jar加进去?请问一个最初级问题
相关话题的讨论汇总
话题: jar话题: file话题: my话题: add话题: use