|
This may be a silly question for Java experts, but even for some one who has some years of Java experience like me, it is still an easily ignored topic. And even the senior developers on our team seem to make mistakes with these.
I want to understand the operators on the Java Integer class. What is Java doing when comparing two Integers? For example, let's say we have Integer a and Integer b. Does Java do reference comparison or value comparison on ==, !=, <, >, <=, >= operators?
And if one of the operator is an Integer and the other is a constant, what does Java do with ==, !=, <, <>, <=, >=?
And if one of the operator is an Integer and the other is an int, what does Java do?
In my experience, seems that Java does reference comparison with two Integers, and seems that it does value comparison with one Integer and one constant.
modified 18-Nov-13 16:13pm.
|
|
|
|
|
The following test program shows what happens:
public class Test {
public static void main(String[] args) {
Integer a;
Integer b;
a = 10;
b = 10;
if (a == b)
System.out.println("True");
}
}
You can also verify by disassembling the class via javap -c .
Veni, vidi, abiit domum
|
|
|
|
|
Richard MacCutchan wrote: The following test program shows what happens:
Errr...I don't think so.
And that is demonstrated by changing the '10' to '1000' and then running the program again.
|
|
|
|
|
You are correct of course; my test was incomplete.
Veni, vidi, abiit domum
|
|
|
|
|
Raptor81 wrote: In my experience, seems that Java does reference comparison with two Integers
Does exactly that for equality and inequality. If it didn't it wouldn't be backwards compatible.
Raptor81 wrote: and seems that it does value comparison with one Integer and one constant.
Yes however the problem with doing that is that one can then forget about equality and inequality. And that becomes even more of a problem because java caches integers in the 0 to 128 range. So simple tests can succeed and then fail in production when bigger values are used. (Keep in mind that the range of integers that are cached is not part of the specification so it can change.)
So the best idea is to never rely on the operators in the first place.
This is demonstrated with the following.
Integer a1 = 1000;
Integer a2 = 1000;
Integer a3 = a1;
Integer b1 = 10;
Integer b2 = 10;
System.out.println("1000 is " + (a1 == a2));
System.out.println("10 is " + (b1 == b2));
System.out.println("1000 != is " + (a1 != a3));
|
|
|
|
|
Integer is not different than any other Java Object
(with the previously noted exception that the jvm provides some help to avoid duplication in the smaller values).
Perhaps one thing that makes it seem confusing is the auto-conversion between 'int' and Integer. I could see that appearing to be confusing at first.
The main thing to remember is that if you want to do numeric comparisons like ==, <, > etc. just make sure you are doing them on 'ints' not Integers.
|
|
|
|
|
Hello everybody.
I am a newbie in Java and I am going to pose a question which may sound silly to most of you , but I run through the whole forum and article list without being able to find a hint.
I have an error in my code which makes me think I do not have, in my classpath, the files needed for my "java.nio.*" import . Figuring my guess is right , how can I know , for any of the packages I import in my project, where the related files are ?
And, which kind of files are they ? for instance , if I am importing the "java.net.*" or "the "java.io.*" packages, are they included in ".jar" files or not ? and where are the related containing files ?
Is there a correspondence rule between the dotted import name form ( package.subpackage1.subpackage2....subpackageN.* ...) and a folder hierarchy somewhere in the filesystem ?
I am using the Netbeans IDE, and I already checked the Tools|Library section, which includes a lot of .jar files, but only for a few of them I've been able to find the related .jar files.
I read a lot of tutorials, manuals ,books and articles about the subject without finding a clear answer to these questions.
Thank you
|
|
|
|
|
tiwal wrote: I have an error in my code which makes me think I do not have, in my classpath, the files needed for my "java.nio.*" import What evidence do you have that leads to this conclusion? The nio package is part of the satndard runtime in rt.jar and should be installed as part of the Java installation.
Veni, vidi, abiit domum
|
|
|
|
|
In effect, actually no evidence at all, Richard, it's just a suspicion I made up by reading some documentation on the net.
But if you say, as I originally thought, that "java.nio.*" is already in the standard runtime, that means my suspicion is wrong.
Anyway, talking in general, is it possible to determine what is (and where is located) the .jar file where a particular import package in contained ?
|
|
|
|
|
tiwal wrote: where a particular import package in contained ? The majority are in the file rt.jar which is in the Java/jrex/lib directory. You can list all the individual jar files by going to that directory and running the command jar tvf rt.jar .
As to your problem, it is much better to gather full diagnostic information rather than making guesses.
Veni, vidi, abiit domum
|
|
|
|
|
thanks for your support. I'll follow your advices.
regards
|
|
|
|
|
The direct answer to your question is yes, there is a direct correspondence between the dotted package names and the directory hierarchy.
So for example, "java.nio.Buffer" is found in the directory "java/nio" and the file the loader looks for (in that directory) is called: "Buffer.class".
What directory? you ask. The answer is any and all directories in the classpath are candidates (that includes jar files).
A jar file is nothing more than a zip file with a different file extension. So open "rt.jar" in Winzip (or whatever zip file viewer you have lying around.
In there you will see all the standard Java library directories, like "javax/swing/tree", "java/awt/font" etc. (these would correspond to packages javax.swing.tree.*, java.awt.font.*).
And in the directory "java/nio" you should find all the java.nio files.
EDIT: by the way, rt.jar is found in the jre/lib directory. So in Windows that would be "/Program Files/Java/jre/lib" or "/Program Files/Java/jdk/jre/lib"
modified 20-Nov-13 13:04pm.
|
|
|
|
|
hi,
I installed
)JDK6 Update
2)Tomcat 7.0
3)Apache-ant 1.9.2
4)javamail1-4-4.zip
5)eclipse-jee-kepler-SR1-win32.zip
i imported openGTS project into eclipse.but i got errors.
This is the console when i build the project.i was added mail.jar&servlet-api.jar externally.
Buildfile: C:\OpenGTS\build.xml
help:
[echo] clean : Remove 'build' directory
[echo] gtsdmtp : Create OpenGTS DMTP server with the MySQL datastore
[echo] events : Create 'Events' Servlet WAR file
[echo] track : Create 'Track' Servlet WAR file
[echo] mologogo : Create 'Mologogo' Servlet WAR file
[echo] tools : Create miscellaneous tools (ie. 'CheckInstall')
[echo] all : all of the above
[echo] help : This help
clean:
[delete] Deleting directory C:\OpenGTS\build
custom.jar:
[echo] Skipping General Custom build ...
customtrack.jar:
[echo] Skipping Track Custom build ...
custom:
prepare:
[mkdir] Created dir: C:\OpenGTS\build
[mkdir] Created dir: C:\OpenGTS\build\lib
[echo] OS = Windows XP
[echo] JavaHome = C:\Program Files\Java\jre6
[exec] java version "1.6.0_45"
[exec] Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
[exec] Java HotSpot(TM) Client VM (build 20.45-b01, mixed mode, sharing)
[copy] Copying 2 files to C:\OpenGTS\build\lib
[echo] (Ignore copy 'not found' warnings)
[copy] Warning: C:\OpenGTS\lib\gtsopt\classes does not exist.
gtsutils.compile:
[echo] Compiling gtsutils.jar source ...
[javac] Compiling 62 source files to C:\OpenGTS\build
[javac] Creating empty C:\OpenGTS\build\org\opengts\util\package-info.class
[echo] Compiling SendMailArgs.java (optional if 'mail.jar' not available) ...
[javac] Compiling 1 source file to C:\OpenGTS\build
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:37: package javax.mail does not exist
[javac] import javax.mail.*;
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:38: package javax.mail.internet does not exist
[javac] import javax.mail.internet.*;
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:365: cannot find symbol
[javac] symbol : class InternetAddress
[javac] location: class org.opengts.util.SendMailArgs
[javac] private static InternetAddress[] _convertRecipients(String to[])
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:366: cannot find symbol
[javac] symbol : class AddressException
[javac] location: class org.opengts.util.SendMailArgs
[javac] throws AddressException
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:400: cannot find symbol
[javac] symbol : class Address
[javac] location: class org.opengts.util.SendMailArgs
[javac] private static void _printAddresses(String msg, Address addr[])
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:167: cannot find symbol
[javac] symbol : class InternetAddress
[javac] location: class org.opengts.util.SendMailArgs
[javac] InternetAddress ia = new InternetAddress(addr, true);
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:167: cannot find symbol
[javac] symbol : class InternetAddress
[javac] location: class org.opengts.util.SendMailArgs
[javac] InternetAddress ia = new InternetAddress(addr, true);
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:266: package javax.mail does not exist
[javac] javax.mail.Authenticator auth = null;
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:268: package javax.mail does not exist
[javac] auth = new javax.mail.Authenticator() {
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:279: cannot find symbol
[javac] symbol : class Session
[javac] location: class org.opengts.util.SendMailArgs
[javac] Session session = Session.getInstance(props, auth);
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:279: cannot find symbol
[javac] symbol : variable Session
[javac] location: class org.opengts.util.SendMailArgs
[javac] Session session = Session.getInstance(props, auth);
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:282: cannot find symbol
[javac] symbol : class MimeMessage
[javac] location: class org.opengts.util.SendMailArgs
[javac] MimeMessage msg = new MimeMessage(session);
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:282: cannot find symbol
[javac] symbol : class MimeMessage
[javac] location: class org.opengts.util.SendMailArgs
[javac] MimeMessage msg = new MimeMessage(session);
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:283: cannot find symbol
[javac] symbol : class InternetAddress
[javac] location: class org.opengts.util.SendMailArgs
[javac] msg.setFrom(new InternetAddress(from));
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:285: cannot find symbol
[javac] symbol : class InternetAddress
[javac] location: class org.opengts.util.SendMailArgs
[javac] InternetAddress toAddr[] = _convertRecipients(to);
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:286: cannot find symbol
[javac] symbol : class InternetAddress
[javac] location: class org.opengts.util.SendMailArgs
[javac] InternetAddress ccAddr[] = _convertRecipients(cc);
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:287: cannot find symbol
[javac] symbol : class InternetAddress
[javac] location: class org.opengts.util.SendMailArgs
[javac] InternetAddress bccAddr[] = _convertRecipients(bcc);
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:296: package Message does not exist
[javac] msg.setRecipients(Message.RecipientType.TO , toAddr);
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:297: package Message does not exist
[javac] msg.setRecipients(Message.RecipientType.CC , ccAddr);
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:298: package Message does not exist
[javac] msg.setRecipients(Message.RecipientType.BCC, bccAddr);
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:302: cannot find symbol
[javac] symbol : class Multipart
[javac] location: class org.opengts.util.SendMailArgs
[javac] Multipart multipart = new MimeMultipart();
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:302: cannot find symbol
[javac] symbol : class MimeMultipart
[javac] location: class org.opengts.util.SendMailArgs
[javac] Multipart multipart = new MimeMultipart();
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:304: cannot find symbol
[javac] symbol : class MimeBodyPart
[javac] location: class org.opengts.util.SendMailArgs
[javac] MimeBodyPart textBodyPart = new MimeBodyPart();
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:304: cannot find symbol
[javac] symbol : class MimeBodyPart
[javac] location: class org.opengts.util.SendMailArgs
[javac] MimeBodyPart textBodyPart = new MimeBodyPart();
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:309: cannot find symbol
[javac] symbol : class BodyPart
[javac] location: class org.opengts.util.SendMailArgs
[javac] BodyPart attachBodyPart = new MimeBodyPart();
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:309: cannot find symbol
[javac] symbol : class MimeBodyPart
[javac] location: class org.opengts.util.SendMailArgs
[javac] BodyPart attachBodyPart = new MimeBodyPart();
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:324: cannot find symbol
[javac] symbol : class Transport
[javac] location: class org.opengts.util.SendMailArgs
[javac] Transport transport = session.getTransport("smtp");
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:329: cannot find symbol
[javac] symbol : variable Transport
[javac] location: class org.opengts.util.SendMailArgs
[javac] Transport.send(msg);
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:338: cannot find symbol
[javac] symbol : class MessagingException
[javac] location: class org.opengts.util.SendMailArgs
[javac] } catch (MessagingException me) {
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:342: cannot find symbol
[javac] symbol : class SendFailedException
[javac] location: class org.opengts.util.SendMailArgs
[javac] if (ex instanceof SendFailedException) {
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:343: cannot find symbol
[javac] symbol : class SendFailedException
[javac] location: class org.opengts.util.SendMailArgs
[javac] SendFailedException sfex = (SendFailedException)ex;
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:343: cannot find symbol
[javac] symbol : class SendFailedException
[javac] location: class org.opengts.util.SendMailArgs
[javac] SendFailedException sfex = (SendFailedException)ex;
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:348: cannot find symbol
[javac] symbol : class MessagingException
[javac] location: class org.opengts.util.SendMailArgs
[javac] ex = (ex instanceof MessagingException)? ((MessagingException)ex).getNextException() : null;
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:348: cannot find symbol
[javac] symbol : class MessagingException
[javac] location: class org.opengts.util.SendMailArgs
[javac] ex = (ex instanceof MessagingException)? ((MessagingException)ex).getNextException() : null;
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:368: cannot find symbol
[javac] symbol : class InternetAddress
[javac] location: class org.opengts.util.SendMailArgs
[javac] java.util.List<InternetAddress> inetAddr = new Vector<InternetAddress>();
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:368: cannot find symbol
[javac] symbol : class InternetAddress
[javac] location: class org.opengts.util.SendMailArgs
[javac] java.util.List<InternetAddress> inetAddr = new Vector<InternetAddress>();
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:386: cannot find symbol
[javac] symbol : class InternetAddress
[javac] location: class org.opengts.util.SendMailArgs
[javac] inetAddr.add(new InternetAddress(t));
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:387: cannot find symbol
[javac] symbol : class AddressException
[javac] location: class org.opengts.util.SendMailArgs
[javac] } catch (AddressException ae) {
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\util\SendMailArgs.java:392: cannot find symbol
[javac] symbol : class InternetAddress
[javac] location: class org.opengts.util.SendMailArgs
[javac] return inetAddr.toArray(new InternetAddress[inetAddr.size()]);
[javac] ^
[javac] 39 errors
[javac] Compile failed; see the compiler error output for details.
[echo] Compiling dbtools ...
[javac] Compiling 24 source files to C:\OpenGTS\build
[javac] Creating empty C:\OpenGTS\build\org\opengts\dbtools\package-info.class
gtsutils.exceltools:
gtsutils.sigHandler:
gtsutils.optional:
gtsutils.jar:
[echo] Creating gtsutils.jar ...
[copy] Copying 14 files to C:\OpenGTS\build
[jar] Building jar: C:\OpenGTS\build\lib\gtsutils.jar
gtsutils:
CompileTime.java:
[echo] Creating CompileTime module ...
gtsdb:
[echo] Creating gtsdb.jar ...
[javac] Compiling 112 source files to C:\OpenGTS\build
[javac] Creating empty C:\OpenGTS\build\org\opengts\geocoder\tinygeocoder\package-info.class
[javac] Creating empty C:\OpenGTS\build\org\opengts\db\tables\package-info.class
[javac] Creating empty C:\OpenGTS\build\org\opengts\geocoder\nominatim\package-info.class
[javac] Creating empty C:\OpenGTS\build\org\opengts\dbtypes\package-info.class
[javac] Creating empty C:\OpenGTS\build\org\opengts\geocoder\google\package-info.class
[javac] Creating empty C:\OpenGTS\build\org\opengts\geocoder\geonames\package-info.class
[javac] Creating empty C:\OpenGTS\build\org\opengts\db\dmtp\package-info.class
[javac] Creating empty C:\OpenGTS\build\org\opengts\geocoder\gisgraphy\package-info.class
[javac] Creating empty C:\OpenGTS\build\org\opengts\geocoder\package-info.class
[javac] Creating empty C:\OpenGTS\build\org\opengts\db\package-info.class
[copy] Copying 45 files to C:\OpenGTS\build
[jar] Building jar: C:\OpenGTS\build\lib\gtsdb.jar
[copy] Copying 1 file to C:\OpenGTS\build\lib
optjars:
tomcat.home:
[echo] 'CATALINA_HOME' is defined - C:\Program Files\Apache Software Foundation\Tomcat 7.0
tomcat.env:
tools:
[echo] Tools ...
[javac] Compiling 4 source files to C:\OpenGTS\build
[javac] Creating empty C:\OpenGTS\build\org\opengts\tools\package-info.class
[copy] Copying 15 files to C:\OpenGTS\build
[jar] Building jar: C:\OpenGTS\build\lib\tools.jar
gtsdmtp:
[echo] Creating 'gtsdmtp.jar' ...
[javac] Compiling 6 source files to C:\OpenGTS\build
[javac] Creating empty C:\OpenGTS\build\org\opengts\servers\gtsdmtp\package-info.class
[jar] Building jar: C:\OpenGTS\build\lib\gtsdmtp.jar
compile.base:
[echo] Libraries compiled ...
icare:
[echo] I-Care G3300 server 'icare.jar' ...
[javac] Compiling 6 source files to C:\OpenGTS\build
[javac] Creating empty C:\OpenGTS\build\org\opengts\servers\icare\package-info.class
[jar] Building jar: C:\OpenGTS\build\lib\icare.jar
aspicore:
[echo] Aspicore 'aspicore.jar' ...
[javac] Compiling 4 source files to C:\OpenGTS\build
[jar] Building jar: C:\OpenGTS\build\lib\aspicore.jar
astra:
[echo] Astra Telematics DCS 'astra.jar' ...
[javac] Compiling 4 source files to C:\OpenGTS\build
[jar] Building jar: C:\OpenGTS\build\lib\astra.jar
tk10x:
[echo] TK102/TK103 'tk10x.jar' ...
[javac] Compiling 4 source files to C:\OpenGTS\build
[jar] Building jar: C:\OpenGTS\build\lib\tk10x.jar
sipgear:
[echo] SipGear 'sipgear.jar' ...
[javac] Compiling 4 source files to C:\OpenGTS\build
[jar] Building jar: C:\OpenGTS\build\lib\sipgear.jar
taip:
[echo] TAIP server 'taip.jar' ...
[javac] Compiling 4 source files to C:\OpenGTS\build
[jar] Building jar: C:\OpenGTS\build\lib\taip.jar
lantrix:
[echo] Lantrix T1800/T2000 DCS 'lantrix.jar' ...
[javac] Compiling 4 source files to C:\OpenGTS\build
[jar] Building jar: C:\OpenGTS\build\lib\lantrix.jar
template:
[echo] template ...
[javac] Compiling 5 source files to C:\OpenGTS\build
[javac] Creating empty C:\OpenGTS\build\org\opengts\servers\template\package-info.class
[jar] Building jar: C:\OpenGTS\build\lib\template.jar
compile.servers:
[echo] Servers compiled ...
wartools:
[echo] Creating 'wartools.jar' ...
[javac] Compiling 20 source files to C:\OpenGTS\build
[javac] Creating empty C:\OpenGTS\build\org\opengts\war\report\package-info.class
[javac] Creating empty C:\OpenGTS\build\org\opengts\war\report\event\package-info.class
[javac] Creating empty C:\OpenGTS\build\org\opengts\war\report\presentation\package-info.class
[javac] Creating empty C:\OpenGTS\build\org\opengts\war\report\field\package-info.class
[javac] Creating empty C:\OpenGTS\build\org\opengts\war\report\dmtp\package-info.class
[javac] Creating empty C:\OpenGTS\build\org\opengts\war\tools\package-info.class
[copy] Copying 75 files to C:\OpenGTS\build
[jar] Building jar: C:\OpenGTS\build\lib\wartools.jar
warmaps:
[echo] Creating 'warmaps.jar' ...
[javac] Compiling 6 source files to C:\OpenGTS\build
[javac] Creating empty C:\OpenGTS\build\org\opengts\war\maps\package-info.class
[javac] Creating empty C:\OpenGTS\build\org\opengts\war\maps\jsmap\package-info.class
[copy] Copying 30 files to C:\OpenGTS\build
[jar] Building jar: C:\OpenGTS\build\lib\warmaps.jar
track.prepare:
[mkdir] Created dir: C:\OpenGTS\build\track
[mkdir] Created dir: C:\OpenGTS\build\track\WEB-INF
[mkdir] Created dir: C:\OpenGTS\build\track\WEB-INF\classes
[mkdir] Created dir: C:\OpenGTS\build\track\WEB-INF\tld
[mkdir] Created dir: C:\OpenGTS\build\track\images
[mkdir] Created dir: C:\OpenGTS\build\track\js
[mkdir] Created dir: C:\OpenGTS\build\track\css
[copy] Copying 5 files to C:\OpenGTS\build\track\WEB-INF
[copy] Copying 7 files to C:\OpenGTS\build\track\WEB-INF
[copy] Warning: C:\OpenGTS\dcservers does not exist.
[copy] Warning: C:\OpenGTS\clients\gts\private does not exist.
[copy] Warning: C:\OpenGTS\clients\gts\war\track\custom does not exist.
[copy] Copying 71 files to C:\OpenGTS\build\track\images
[copy] Copying 180 files to C:\OpenGTS\build\track
track.compile:
[echo] Compiling 'track.war' servlet ...
[javac] Compiling 41 source files to C:\OpenGTS\build\track\WEB-INF\classes
[javac] Creating empty C:\OpenGTS\build\track\WEB-INF\classes\org\opengts\war\track\package-info.class
[javac] Creating empty C:\OpenGTS\build\track\WEB-INF\classes\org\opengts\war\track\page\devcmd\package-info.class
[javac] Creating empty C:\OpenGTS\build\track\WEB-INF\classes\org\opengts\war\track\taglib\package-info.class
[javac] Creating empty C:\OpenGTS\build\track\WEB-INF\classes\org\opengts\war\track\page\package-info.class
[copy] Copying 45 files to C:\OpenGTS\build\track\WEB-INF\classes
track.war:
[echo] Creating 'track.war' archive ...
[war] Building war: C:\OpenGTS\build\track.war
track:
[echo] 'track.war' created.
events.compile:
[echo] Compiling 'events.war' servlet ...
[mkdir] Created dir: C:\OpenGTS\build\events
[mkdir] Created dir: C:\OpenGTS\build\events\WEB-INF
[mkdir] Created dir: C:\OpenGTS\build\events\WEB-INF\classes
[mkdir] Created dir: C:\OpenGTS\build\events\WEB-INF\tlds
[javac] Compiling 2 source files to C:\OpenGTS\build\events\WEB-INF\classes
[javac] Creating empty C:\OpenGTS\build\events\WEB-INF\classes\org\opengts\war\events\package-info.class
[copy] Copying 5 files to C:\OpenGTS\build\events\WEB-INF
[copy] Copying 1 file to C:\OpenGTS\build\events
[copy] Copying 2 files to C:\OpenGTS\build\events\WEB-INF
[copy] Warning: C:\OpenGTS\clients\gts\private does not exist.
events.war:
[echo] Creating 'events.war' file ...
[war] Building war: C:\OpenGTS\build\events.war
events:
[echo] 'events.war' created.
mologogo.compile:
[echo] Compiling 'mologogo.war' servlet ...
[mkdir] Created dir: C:\OpenGTS\build\mologogo
[mkdir] Created dir: C:\OpenGTS\build\mologogo\WEB-INF
[mkdir] Created dir: C:\OpenGTS\build\mologogo\WEB-INF\classes
[mkdir] Created dir: C:\OpenGTS\build\mologogo\WEB-INF\tlds
[javac] Compiling 2 source files to C:\OpenGTS\build\mologogo\WEB-INF\classes
[javac] Creating empty C:\OpenGTS\build\mologogo\WEB-INF\classes\org\opengts\war\mologogo\package-info.class
[copy] Copying 5 files to C:\OpenGTS\build\mologogo\WEB-INF
[copy] Copying 1 file to C:\OpenGTS\build\mologogo
[copy] Copying 2 files to C:\OpenGTS\build\mologogo\WEB-INF
[copy] Warning: C:\OpenGTS\clients\gts\private does not exist.
mologogo.war:
[echo] Creating 'mologogo.war' archive ...
[war] Building war: C:\OpenGTS\build\mologogo.war
mologogo:
[echo] 'mologogo.war' created.
gc101.compile:
[echo] Compiling 'gc101.war' servlet ...
[mkdir] Created dir: C:\OpenGTS\build\gc101
[mkdir] Created dir: C:\OpenGTS\build\gc101\WEB-INF
[mkdir] Created dir: C:\OpenGTS\build\gc101\WEB-INF\classes
[javac] Compiling 2 source files to C:\OpenGTS\build\gc101\WEB-INF\classes
[javac] Creating empty C:\OpenGTS\build\gc101\WEB-INF\classes\org\opengts\war\gc101\package-info.class
[copy] Copying 5 files to C:\OpenGTS\build\gc101\WEB-INF
[copy] Copying 1 file to C:\OpenGTS\build\gc101
[copy] Copying 2 files to C:\OpenGTS\build\gc101\WEB-INF
[copy] Warning: C:\OpenGTS\clients\gts\private does not exist.
gc101.war:
[echo] Creating 'gc101.war' archive ...
[war] Building war: C:\OpenGTS\build\gc101.war
gc101:
[echo] 'gc101.war' created.
gprmc.compile:
[echo] Compiling 'gprmc.war' servlet ...
[mkdir] Created dir: C:\OpenGTS\build\gprmc
[mkdir] Created dir: C:\OpenGTS\build\gprmc\WEB-INF
[mkdir] Created dir: C:\OpenGTS\build\gprmc\WEB-INF\classes
[mkdir] Created dir: C:\OpenGTS\build\gprmc\WEB-INF\tlds
[javac] Compiling 2 source files to C:\OpenGTS\build\gprmc\WEB-INF\classes
[javac] C:\OpenGTS\src\org\opengts\war\gprmc\Data.java:285: package javax.mail does not exist
[javac] import javax.mail.Session;
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\war\gprmc\Data.java:286: package javax.mail does not exist
[javac] import javax.mail.Message;
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\war\gprmc\Data.java:287: package javax.mail.internet does not exist
[javac] import javax.mail.internet.MimeMessage;
[javac] ^
[javac] C:\OpenGTS\src\org\opengts\war\gprmc\Data.java:288: package javax.mail.internet does not exist
[javac] import javax.mail.internet.InternetAddress;
[javac] ^
[javac] 4 errors
BUILD FAILED
C:\OpenGTS\build.xml:1350: Compile failed; see the compiler error output for details.
Total time: 22 seconds
|
|
|
|
|
Member 10263519 wrote: [javac] C:\OpenGTS\src\org\opengts\war\gprmc\Data.java:285: package javax.mail does not exist The above message appears 4 times; I guess that is telling you what is wrong.
Veni, vidi, abiit domum
|
|
|
|
|
ok , i added mail.jar in
C:\Program Files\Java\jdk1.6.0_45\jre\lib\ext and
C:\Program Files\Java\jre6\lib\ext and also added from build path-->external jar's.
|
|
|
|
|
anyone know seasar framework? give me documentation and examples, please
|
|
|
|
|
Please make an effort to search for it yourself, before posting such questions.
Veni, vidi, abiit domum
|
|
|
|
|
tks , i try to find information seasar on website[^] .But it's difficult to understand because it is framework's japanese, i need some demo or documents,please
|
|
|
|
|
thetime1102 wrote: give me documentation and examples, please
Here you go[^]
You might consider using Google the next time before you ask a question here which can be solved in such an obvious way.
|
|
|
|
|
of course,i know how using google to find info , important that i need someone instructions me using seasar .sorry, i'm newbie
|
|
|
|
|
|
How can I search data from Remote Server and display it on client Java Form in Java RMI(Remote Method Invocation)?
Thanks!
|
|
|
|
|
|
Here is sample Requirement!
I need Java Web Services Sample Project implemented in both RPC & RMI.
Functional Requirements:
Login
Add Student
Update Student
Search Student
Delete Student
Database: MySQL
Can I get it now????
Thanks for your time and consideration!
|
|
|
|
|
Please stop posting this; no one is going to give you a ready made solution.
Veni, vidi, abiit domum
|
|
|
|
|