error while building a project in netbeans


J

jainshasha

hi guys

actually i try to build someone else project through netbeans
so it gives the output shown below

init:

deps-jar:

Compiling 3 source files to C:\Documents and Settings\Zoomi\My
Documents\NetBeansProjects\JpxxMailServer\build\classes

Note: .....\NetBeansProjects\JpxxMailServer\src\org\jpxx\mail\JJ.java
uses or overrides a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

compile:

Building jar: .....\NetBeansProjects\JpxxMailServer\dist
\JpxxMailServer.jar

Copy libraries to ......\NetBeansProjects\JpxxMailServer\dist\lib.

To run this application from the command line without Ant, try:

java -jar "......\NetBeansProjects\JpxxMailServer\dist
\JpxxMailServer.jar"
jar:

BUILD SUCCESSFUL (total time: 3 seconds)


and makes a jar in the /dist folder which on executing that jar file
make these two exceptions

"A Java Exception Occured"

"Error : Could not find the main class "
"Error : A JNI error has occured, please check your installation and
try again"

although i have made the file in which i define the main class


so check out this and help if someone knows
 
Ad

Advertisements

F

Fred

hi guys

actually i try to build someone else project through netbeans
so it gives the output shown below

init:

deps-jar:

Compiling 3 source files to C:\Documents and Settings\Zoomi\My
Documents\NetBeansProjects\JpxxMailServer\build\classes

Note: .....\NetBeansProjects\JpxxMailServer\src\org\jpxx\mail\JJ.java
uses or overrides a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

compile:

Building jar: .....\NetBeansProjects\JpxxMailServer\dist
\JpxxMailServer.jar

Copy libraries to ......\NetBeansProjects\JpxxMailServer\dist\lib.

To run this application from the command line without Ant, try:

java -jar "......\NetBeansProjects\JpxxMailServer\dist
\JpxxMailServer.jar"
jar:

BUILD SUCCESSFUL (total time: 3 seconds)

and makes a jar in the /dist folder which on executing that jar file
make these two exceptions

"A Java Exception Occured"

"Error : Could not find the main class "
"Error : A JNI error has occured, please check your installation and
try again"

although i have made the file in which i define the main class

so check out this and help if someone knows

What file is main in? What package is it in?
Where do you save the jar file?
Do you have your CLASSPATH set properly?
What command are you using to execute?
 
J

jainshasha

What file is main in? What package is it in?
Where do you save the jar file?
Do you have your CLASSPATH set properly?
What command are you using to execute?

main file is in JJ.java
external jar files are stored in \lib
executing through command line i use
java -jar ".....\NetBeansProjects\JpxxMailServer\dist
\JpxxMailServer.jar
 
L

Lew

jainshasha said:
main file is in JJ.java
external jar files are stored in \lib
executing through command line i use
java -jar ".....\NetBeansProjects\JpxxMailServer\dist
\JpxxMailServer.jar

Does the JAR manifest specify the 'Class-pPath:' to the external JARs?
 
Ad

Advertisements

J

jainshasha

Does the JAR manifest specify the 'Class-pPath:' to the external JARs?

well in the class path they show me in this way

Class-Path: lib/commons-dbcp-1.2.2.jar lib/commons-pool-1.3.jar lib/dn
sjava-2.0.5.jar lib/jdom.jar lib/JMSConsole.jar lib/log4j-1.2.15.jar
lib/mail.jar lib/mysql-connector-java-3.1.14-bin.jar lib/substance.ja
r
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top