Can I compiler servlet with java compiler?

Can I compiler servlet with java compiler?
Here is an example of it:
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
public class HelloWorldServlet extends HttpServlet
          protected void doGet(HttpServletRequest request,
          HttpServletResponse response) throws ServletException , IOException
                    response.setContentType("text/html");
                    PrintWriter out = response.getWriter();
                    StringBuffer sb = new StringBuffer();
                    sb.append("<html><body><h1>");
                    sb.append("Hello World");
                    sb.append("</h1></body></html>");
                    out.print(sb.toString());
                    out.close();
     }

Can I compiler servlet with java compiler?
yes.
just include the correct jarfiles in your classpath.

Similar Messages

  • How can i create messenger with java tv API on STB

    deal all.
    how can i create messenger with java tv API on STB.
    how can Xlets communicate each other?
    how?
    i am interested in xlet communications with java tv.
    is it impossible or not?
    help all..

    You can create a messenger-style application using JavaTV fairly easily. JavaTV supports standard java.net, and so any IP-based connection is pretty easy to do. The hard part of the application will be text input, but people have been using cellphone keypads to send SMS messages for long enough that they're familiar with doing this. This doesn't work well for long messages, where you really need a decent keyboard, but for short SMS-type messages it's acceptable.
    The biggest problem that you need to work around is the return channel. Many receivers only have a dial-up connection, ties up the phone line and potentially costs people money if they don't get free local calls. Always-on return channels (e.g. ADSL or cable modem) are still pretty uncommon, so it's something that you nee to think about. Of course, if you do have an always-on connection then this problem just goes away.
    This is really one of those cases that's technically do-able, but the infrastructure may not be there to give users a good experience.
    Steve.

  • Compiling servlet with helper class

    Hello,
    I have to write a very large number of database queries and huge amount of code so I decided to make each helper *.class file for each table.
    Now I have a main servlet that should instantiate each of these helper classes and conduct DB operations:
    //Servlet code
    RescardreservationTable rv = new RescardreservationTable();
    rv.insertInfo();
    RescardPassengerTable rp = new RescardPassengerTable();
    rp.insertInfo();RescardreservationTable.class
    //does DB opsMy problem is that when I try to compile servlet, I get
    insert_data.java:172: cannot find symbol
    symbol : class RescardreservationTable
    location: class insert_data
    RescardreservationTable rv = new RescardreservationTable();
    Could somebody please tell me how I can make servlet locate my java classes that it has to use?
    Thanks,
    Victor.
    Edited by: vic_sk on Dec 9, 2008 9:29 AM

    Ok, looks like it's solved. Just forcing the compiler with -classpath to look for the required class file.

  • JSP compilation failed with java.lang.IllegalStateException: zip file close

    Hi,
    I have a web app successfully deployed on Weblogic7.0 and HP UX 11.0, which uses jdk 1.3.1_02
    In this application, when i invoke a jsp (this exception occurs on any jsp not to any specific jsp), i found the following exception trace on wl-domain.log file and server crashes: -
    java.lang.IllegalStateException: zip file closed
         at java.util.zip.ZipFile.getEntry(Unknown Source)
         at weblogic.servlet.internal.WarClassFinder.getSource(WarClassFinder.java, Compiled Code)
         at weblogic.servlet.internal.WarClassFinder.getSource(WarClassFinder.java, Compiled Code)
         at weblogic.utils.classloaders.MultiClassFinder.getSource(MultiClassFinder.java, Compiled Code)
         at weblogic.utils.classloaders.MultiClassFinder.getSource(MultiClassFinder.java, Compiled Code)
         at weblogic.utils.classloaders.MultiClassFinder.getClassSource(MultiClassFinder.java, Compiled Code)
         at weblogic.utils.classloaders.ChangeAwareClassLoader.upToDate(ChangeAwareClassLoader.java, Compiled Code)
         at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java, Compiled Code)
         at weblogic.servlet.internal.ServletStubImpl.checkForReload(ServletStubImpl.java, Compiled Code)
         at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java, Compiled Code)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java, Compiled Code)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java, Compiled Code)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java, Compiled Code)
         at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java, Compiled Code)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java, Compiled Code)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java, Compiled Code)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java, Compiled Code)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
    Can anyone help me in figuring out this problem urgently?
    thanks in advance
    manoj

    Hi Manoj.I am also getting the same problem in the weblogicserver version-6.1 SP2.It is also using the jdk 1.31.
    here is my stack trace.Help i smuch appreciated.!!
    java.lang.IllegalStateException: zip file closed
         at java.util.zip.ZipFile.getEntry(ZipFile.java:141)
         at weblogic.servlet.internal.WarClassFinder.getSource(WarClassFinder.java:197)
         at weblogic.servlet.internal.WarClassFinder.getSource(WarClassFinder.java:106)
         at weblogic.utils.classloaders.MultiClassFinder.getSource(MultiClassFinder.java:53)
         at weblogic.utils.classloaders.MultiClassFinder.getSource(MultiClassFinder.java:53)
         at weblogic.utils.classloaders.MultiClassFinder.getClassSource(MultiClassFinder.java:45)
         at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:265)
         at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:156)
         at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:65)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
         at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:43)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
         at org.exolab.castor.xml.Unmarshaller.unmarshal(Unknown Source)
         at org.exolab.castor.xml.Unmarshaller.unmarshal(Unknown Source)
         at org.exolab.castor.xml.Unmarshaller.unmarshal(Unknown Source)
         at com.slfc.framework.service.ServiceMessageFactory.createServiceResult(ServiceMessageFactory.java:58)
         at sunlife.nexus.admin.SecPro.establishSupportSession(Unknown Source)
         at sunlife.nexus.admin.Page_secPro_extAppLoader.processPageRequest(Unknown Source)
         at sunlife.wis.servlets.WISServlet.redirect(WISServlet.java:63)
         at sunlife.wis.servlets.WISServlet.doExec(WISServlet.java:107)
         at sunlife.wis.servlets.WISServlet.doGet(WISServlet.java:70)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2495)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2204)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

  • [ SOLVED ] Compile Error with Java Fonts & IntelliJ

    Hi All
    I have now got a new problem when i compile a flex project.  Yesterday inorder to get the IJ Interface font smoothing sorted, i had to add this line to my ~/.bashrc file
    _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on
    But now when i go to run a flex project, i get the following error message
    Information:Using built-in compiler shell, up to 4 parallel threads
    See compiler settings at File | Settings | Compiler | Flex Compiler page
    Information:Starting Flex compiler:
    /opt/java/jre/bin/java -Dapplication.home=/home/julian/SDK/flex_sdk_4.5.0.17855 -Xmx384m -Dsun.io.useCanonCaches=false -Duser.language=en -Duser.region=en -Xmx1024m -classpath /opt/idea-IU-98.311/plugins/flex/lib/flex-compiler.jar:/home/julian/SDK/flex_sdk_4.5.0.17855/lib/flex-compiler-oem.jar com.intellij.flex.compiler.FlexCompiler 48936
    Information:Compilation completed with 2 errors and 0 warnings
    Information:2 errors
    Information:0 warnings
    Error:Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on
    Error:java.net.SocketException: Socket closed
    Error:java.net.ConnectException: Connection refused
    Error:     at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
         at java.net.Socket.connect(Socket.java:529)
         at java.net.Socket.connect(Socket.java:478)
         at java.net.Socket.<init>(Socket.java:375)
         at java.net.Socket.<init>(Socket.java:218)
         at com.intellij.flex.compiler.FlexCompiler.openSocket(FlexCompiler.java:35)
         at com.intellij.flex.compiler.FlexCompiler.main(FlexCompiler.java:70)
    Any suggestions, besides disabling the _JAVA_OPTION again ?
    Many Thanks
    Last edited by whitetimer (2010-11-14 17:24:11)

    -Dawt.useSystemAAFontSettings=on needs to be added to the end of file
    idea.vmoptions

  • Constants with Java Compiler ?

    When recompiling java files which contains CONSTANTS, I mean static final variables,
    I should also recompile the classes from
    which these constants are referred to. Otherwise
    I get buggy results. Is this an aimed result of
    Java or a bug of Java, I wonder ?

    my statement is TRUE also if the member is not declared as "final". When a Java Compiler do work,
    it replaces "REFERENCES TO MEMBERS ASSIGNED CONSTANT VALUES" with their compile-time assigned values. Thus,
    --------- here is A.java ----------
    public class A {
    public static void main(String [] str) {
    System.out.println(""+ b.b);
    ---- here is B.java --------------
    public class B {
    static final int b = 10;
    after producing A.class and B.class , if reproduce
    B.class to have member b = 20 then,
    java A
    is gonna print out 10, so not displaying the real value ??
    I think One class' compilation should not be dependent
    to others classes' compilation. It seems to be a BUG of Java ? Does'nt ?
    When recompiling java files which containsCONSTANTS,
    I mean static final variables,
    I should also recompile the classes from
    which these constants are referred to. Otherwise
    I get buggy results. Is this an aimed result of
    Java or a bug of Java, I wonder ?static final int number = 3;
    MyClass.number will be parsed to 3, since it's
    guaranteed not to change unless you of course modify
    the source.

  • Voice Recognition security System... Can it be done with Java??

    i'm working in graduation project and i'm developing a system that use voice Recognition security System [the user voice as ID] so i'm asking if it can be done with java and if any tutorials about it ??
    null

    Make the PDF file available as a normal URL on the server.
    Redirect the client browser to the URL.
    This will work IF Acrobat is installed, AND is installed as a plugin to the browser, but that's a reasonable assumption if you're presenting PDF files in the first place.
    I wouldn't personally be inclined to try to do this with an applet (JSPs + Servlets would be the way to go in my opinion), but it may be possible to redirect the page from an applet...?

  • Trouble compiling servlets with J2SE 5

    Hello,
    I've been using Sun 1 Studio CE, and more recently, Netbeans 3.6, with J2SE 1.4.2. I have some basic swing applets and servlets that I wrote for my business' web site.
    I recently downloaded and installed the new software bundle containing Netbeans 4.0 and J2SE 1.5. When I try to compile my servlets, I get a compiler error that packages javax.servlet.* and javax.servlet.http.* do not exist.
    I reinstalled J2SE 1.4.2 and Netbeans 3.6 and the servlets compile fine.
    Why is JDK 5 not able to find these packages? My understanding is that they're part of the Java Servlet API, which I never explicitly downloaded previously. Is that the piece of the puzzle that I'm missing? Please help!
    Thanks

    Thanks for your response...
    What is interesting is that I never explicitly installed the Servlet API. Out of curiosity, I searched my computer for servlet*.jar and came up with 13 files including:
    servlet-2.2.jar
    servlet-2.3.jar
    servlet-api-2.4.jar
    These were located in subdirectories under Netbeans 3.6 and Tomcat 5.0.19. Therefore, I'm assuming that when I downloaded the JDK 1.4.2/Netbeans 3.6 bundle from the Java site, the Servlet API must have been part of the bundle.
    ****Let me check something...***
    I've just done the same search for servlet*.jar on my test PC, which has the Netbeans 4.0/JDK 5 bundle installed. The same files exist, in the same locations(almost the same, anyway; the Tomcat and Netbeans 4 directory structures are a little different).
    Both software bundles contain the same files, yet 1.4.2 compiles without any problems or additional configuration. In other words, I reinstalled the old 1.4.2/ Netbeans 3.6 bundle, took my existing source code, and started compiling.
    Any ideas why the same isn't true for JDK 5/Netbeans 4? I know there are changes to the way Netbeans 4.0 deals with Class Paths, but I thought that was for the classes I've written. Shouldn't the compiler be able to find the servlet API, since it bundled/installed with everything else?
    Thanks

  • How to compile servlet with Edit Plus?

    Hi
    I am writing a Java servlet in EditPlus and am wondering how to include the servlet.jar file so that EditPlus knows where the javax.servlet.*, etc classes are. I suppose this is an EditPlus specific question so sorry about that but I didn't know who else to ask other than EditPlus themselves of course and I think I have tried that once.
    I have read replies on this forum about changing the classpath but I dont think that that is what I need to do here and if it is I dont know what I should be writing as I am not using the jdk.
    If anyone can help me at all I would be very grateful.
    Thanks

    Yes, I have also compiled Java files from EditPlus. Using the facilities for configuring 'User Tools' in EditPlus.
    EditPlus runts programs(javac in the current context) in a separate environment(separate DOS command).
    I just compiled, from EditPlus, some Java file of mine that uses something from the servlet API. It compiled just fine. I did not do any classpath or other setup on classpath lines inside EditPlus. I guess, EditPlus inherits the existing CLASSPATH(all environment settings in fact) setting from your environment and thereafter aslo passes it along to the separate command prompt it opens to run user configured tools to run.

  • Two versions of code, one compile failure with java.lang.OutOfMemoryError

    I Have two cvs versions of one package. The differences between the two are minor, and I'm only trying to make the root version look like the latest branch. When I compile the branch, which has more code, things are fine. When I comple the root version I get
    java.lang.OutOfMemoryErrorSInce I can compile one version, it is clearly not the case that I lack RAM or something like that. What might the problem be? Thanks.
    Ken

    I'm compiling and I'm doing it with ant. As I said,
    it works fine with a slightly updated version of the
    Java package I have, but has this error while doing
    the same compile on the cvs root version of the
    package. I'm just trying to prepare for mergning the
    new code but can't compile the basic version of the
    package.Then, as already stated, the difference between the two versions is enough to cross the threshold of heap memory available to the VM that's running the compiler. Ant lets you provide VM options to an externally invoked VM. See its docs for how. If you're using fork="false", then just change or add -Xmx in ant.bat or ant.sh.

  • "catch is unreachable" compiler error with java try/catch statement

    I'm receiving a compiler error, "catch is unreachable", with the following code. I'm calling a method, SendMail(), which can throw two possible exceptions. I thought that the catch statements executed in order, and the first one that is caught will execute? Is their a change with J2SE 1.5 compiler? I don't want to use a generic Exception, because I want to handle the specific exceptions. Any suggestions how to fix? Thanks
    try {
    SendMail(....);
    } catch (MessagingException e1) {
    logger.fine(e1.toString());
    } catch (AddressException e2) {
    logger.fine(e2.toString());
    public String SendMail(....) throws AddressException,
    MessagingException {....                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    I found the problem:
    "A catch block handles exceptions that match its exception type (parameter) and exception types that are subclasses of its exception type (parameter). Only the first catch block that handles a particular exception type will execute, so the most specific exception type should come first. You may get a catch is unreachable syntax error if your catch blocks do not follow this order."
    If I switch the order of the catch exceptions the compiler error goes away.
    thanks

  • Flex with java compilation

    hi
    i have done flex project which contains a videoplayer and some informations.
    i have used j2ee server using lcds.
    when i run a build.xml file that time the following error occurs
    Buildfile: E:\Documents and Settings\Kavi Priya\Adobe Flash Builder 4\VideoPlayer\build.xml
    Trying to override old definition of datatype resources
    prepare:
        [mkdir] Created dir: E:\Documents and Settings\Kavi Priya\Adobe Flash Builder 4\VideoPlayer\build
        [mkdir] Created dir: E:\Documents and Settings\Kavi Priya\Adobe Flash Builder 4\VideoPlayer\build\WEB-INF
        [mkdir] Created dir: E:\Documents and Settings\Kavi Priya\Adobe Flash Builder 4\VideoPlayer\build\WEB-INF\classes
        [mkdir] Created dir: E:\Documents and Settings\Kavi Priya\Adobe Flash Builder 4\VideoPlayer\build\html
         [copy] Warning: META-INF\MANIFEST.MF modified in the future.
         [copy] Warning: WEB-INF\flex\messaging-config.xml modified in the future.
         [copy] Warning: WEB-INF\flex\proxy-config.xml modified in the future.
         [copy] Warning: WEB-INF\flex\remoting-config.xml modified in the future.
         [copy] Warning: WEB-INF\flex\services-config.xml modified in the future.
         [copy] Warning: WEB-INF\lib\backport-util-concurrent.jar modified in the future.
         [copy] Warning: WEB-INF\lib\cfgatewayadapter.jar modified in the future.
         [copy] Warning: WEB-INF\lib\commons-codec-1.3.jar modified in the future.
         [copy] Warning: WEB-INF\lib\commons-fileupload-1.2.1.jar modified in the future.
         [copy] Warning: WEB-INF\lib\commons-httpclient-3.0.1.jar modified in the future.
         [copy] Warning: WEB-INF\lib\commons-io-1.4.jar modified in the future.
         [copy] Warning: WEB-INF\lib\commons-logging.jar modified in the future.
         [copy] Warning: WEB-INF\lib\concurrent.jar modified in the future.
         [copy] Warning: WEB-INF\lib\flex-messaging-common.jar modified in the future.
         [copy] Warning: WEB-INF\lib\flex-messaging-core.jar modified in the future.
         [copy] Warning: WEB-INF\lib\flex-messaging-opt.jar modified in the future.
         [copy] Warning: WEB-INF\lib\flex-messaging-proxy.jar modified in the future.
         [copy] Warning: WEB-INF\lib\flex-messaging-remoting.jar modified in the future.
         [copy] Warning: WEB-INF\lib\mxmlc.jar modified in the future.
         [copy] Warning: WEB-INF\lib\xalan.jar modified in the future.
         [copy] Warning: WEB-INF\web.xml modified in the future.
         [copy] Warning:  modified in the future.
         [copy] Warning: META-INF modified in the future.
         [copy] Warning: WEB-INF modified in the future.
         [copy] Warning: WEB-INF\classes modified in the future.
         [copy] Warning: WEB-INF\flex modified in the future.
         [copy] Warning: WEB-INF\lib modified in the future.
         [copy] Warning: WEB-INF\src modified in the future.
         [copy] Copying 24 files to E:\Documents and Settings\Kavi Priya\Adobe Flash Builder 4\VideoPlayer\build
         [copy] Copied 9 empty directories to 1 empty directory under E:\Documents and Settings\Kavi Priya\Adobe Flash Builder 4\VideoPlayer\build
         [copy] Warning: AC_OETags.js modified in the future.
         [copy] Warning: assets\namastecue.flv modified in the future.
         [copy] Warning: history\history.css modified in the future.
         [copy] Warning: history\history.js modified in the future.
         [copy] Warning: history\historyFrame.html modified in the future.
         [copy] Warning: icons\16calendar.gif modified in the future.
         [copy] Warning: icons\16chat.gif modified in the future.
         [copy] Warning: icons\16clock.gif modified in the future.
         [copy] Warning: icons\16dairy.gif modified in the future.
         [copy] Warning: icons\16files.gif modified in the future.
         [copy] Warning: icons\16mail.gif modified in the future.
         [copy] Warning: icons\16minus.gif modified in the future.
         [copy] Warning: icons\16minus.png modified in the future.
         [copy] Warning: icons\16news.gif modified in the future.
         [copy] Warning: icons\16next.gif modified in the future.
         [copy] Warning: icons\16pad.gif modified in the future.
         [copy] Warning: icons\16percent.gif modified in the future.
         [copy] Warning: icons\16percent.png modified in the future.
         [copy] Warning: icons\16plus.gif modified in the future.
         [copy] Warning: icons\16plus.png modified in the future.
         [copy] Warning: icons\16previous.gif modified in the future.
         [copy] Warning: icons\16previous.png modified in the future.
         [copy] Warning: icons\16tag.gif modified in the future.
         [copy] Warning: icons\16tag.png modified in the future.
         [copy] Warning: icons\32calendar.gif modified in the future.
         [copy] Warning: icons\32calendar.png modified in the future.
         [copy] Warning: icons\32chat.gif modified in the future.
         [copy] Warning: icons\32chat.png modified in the future.
         [copy] Warning: icons\32clock.gif modified in the future.
         [copy] Warning: icons\32clock.png modified in the future.
         [copy] Warning: icons\32dairy.gif modified in the future.
         [copy] Warning: icons\32dairy.png modified in the future.
         [copy] Warning: icons\32files.gif modified in the future.
         [copy] Warning: icons\32files.png modified in the future.
         [copy] Warning: icons\32mail.gif modified in the future.
         [copy] Warning: icons\32mail.png modified in the future.
         [copy] Warning: icons\32minus.gif modified in the future.
         [copy] Warning: icons\32minus.png modified in the future.
         [copy] Warning: icons\32news.gif modified in the future.
         [copy] Warning: icons\32news.png modified in the future.
         [copy] Warning: icons\32next.gif modified in the future.
         [copy] Warning: icons\32next.png modified in the future.
         [copy] Warning: icons\32pad.gif modified in the future.
         [copy] Warning: icons\32pad.png modified in the future.
         [copy] Warning: icons\32percent.gif modified in the future.
         [copy] Warning: icons\32percent.png modified in the future.
         [copy] Warning: icons\32plus.gif modified in the future.
         [copy] Warning: icons\32plus.png modified in the future.
         [copy] Warning: icons\32previous.gif modified in the future.
         [copy] Warning: icons\32previous.png modified in the future.
         [copy] Warning: icons\32tag.gif modified in the future.
         [copy] Warning: icons\32tag.png modified in the future.
         [copy] Warning: icons\Thumbs.db modified in the future.
         [copy] Warning: icons\alternative_energy.gif modified in the future.
         [copy] Warning: icons\alternative_energy.png modified in the future.
         [copy] Warning: icons\butterfly.gif modified in the future.
         [copy] Warning: icons\butterfly.png modified in the future.
         [copy] Warning: icons\cloud.gif modified in the future.
         [copy] Warning: icons\forward.png modified in the future.
         [copy] Warning: icons\icon_profile_graduate.gif modified in the future.
         [copy] Warning: icons\icon_profile_graduate.png modified in the future.
         [copy] Warning: icons\icon_profile_man_emp.gif modified in the future.
         [copy] Warning: icons\icon_profile_man_emp.png modified in the future.
         [copy] Warning: icons\icon_profile_woman_emp.gif modified in the future.
         [copy] Warning: icons\icon_profile_woman_emp.png modified in the future.
         [copy] Warning: icons\icon_progress.gif modified in the future.
         [copy] Warning: icons\icon_progress.png modified in the future.
         [copy] Warning: icons\idea_icon.gif modified in the future.
         [copy] Warning: icons\idea_icon.png modified in the future.
         [copy] Warning: icons\imagelast1.png modified in the future.
         [copy] Warning: icons\leaf.gif modified in the future.
         [copy] Warning: icons\leaf.png modified in the future.
         [copy] Warning: icons\mute.png modified in the future.
         [copy] Warning: icons\next .png modified in the future.
         [copy] Warning: icons\pause.png modified in the future.
         [copy] Warning: icons\pause_grey.png modified in the future.
         [copy] Warning: icons\pausenew.png modified in the future.
         [copy] Warning: icons\play.png modified in the future.
         [copy] Warning: icons\play_big.png modified in the future.
         [copy] Warning: icons\play_grey.png modified in the future.
         [copy] Warning: icons\playicon.png modified in the future.
         [copy] Warning: icons\prev.png modified in the future.
         [copy] Warning: icons\repeat.png modified in the future.
         [copy] Warning: icons\replay.png modified in the future.
         [copy] Warning: icons\rewind.png modified in the future.
         [copy] Warning: icons\save_fuel.gif modified in the future.
         [copy] Warning: icons\stop.png modified in the future.
         [copy] Warning: index.html modified in the future.
         [copy] Warning: playerProductInstall.swf modified in the future.
         [copy] Warning:  modified in the future.
         [copy] Warning: assets modified in the future.
         [copy] Warning: history modified in the future.
         [copy] Warning: icons modified in the future.
         [copy] Copying 89 files to E:\Documents and Settings\Kavi Priya\Adobe Flash Builder 4\VideoPlayer\build\html
    build:
        [javac] Warning: vid\DAOException.java modified in the future.
        [javac] Warning: videocue\videoServiceDAO.java modified in the future.
        [javac] Warning: videocue\videoVO.java modified in the future.
        [javac] Compiling 3 source files to E:\Documents and Settings\Kavi Priya\Adobe Flash Builder 4\VideoPlayer\build\WEB-INF\classes
    BUILD FAILED
    E:\Documents and Settings\Kavi Priya\Adobe Flash Builder 4\VideoPlayer\build.xml:79: Unable to find a javac compiler;
    com.sun.tools.javac.Main is not on the classpath.
    Perhaps JAVA_HOME does not point to the JDK.
    It is currently set to "E:\Program Files\Adobe\Adobe Flash Builder 4\jre"
    Total time: 500 milliseconds
    how i rectify this problem
    regards
    athi

    Hi,
    Please fallow following link
    http://www.adobe.com/devnet/flex/articles/flashbuilder_blazeds.html
    thanks,
    atul ([email protected])

  • Some compiling problem with java files in JSP

    I wrote a file "ProductManager.java" to use the class of Product to do certain functions which are executed in a jsp, however, there are some curious errors.
    C:\Tomcat\webapps\examples\WEB-INF\classes\com\wrox\begjsp\arrayexample3>javac P
    roductManager.java
    ProductManager.java:5: cannot resolve symbol
    symbol : class Product
    location: class com.wrox.begjsp.arrayexample3.ProductManager
    private Product[] productList = new Product[3];
    ^
    ProductManager.java:20: cannot resolve symbol
    symbol : class Product
    location: class com.wrox.begjsp.arrayexample3.ProductManager
    public Product[] getProductList(){
    ^
    ProductManager.java:28: cannot resolve symbol
    symbol : class Product
    location: class com.wrox.begjsp.arrayexample3.ProductManager
    public Product getProductDetails(int prodid) {
    ^
    ProductManager.java:5: cannot resolve symbol
    symbol : class Product
    location: class com.wrox.begjsp.arrayexample3.ProductManager
    private Product[] productList = new Product[3];
    ^
    ProductManager.java:13: cannot resolve symbol
    symbol : class Product
    location: class com.wrox.begjsp.arrayexample3.ProductManager
    productList[0] = new Product(1,"Wrox Press Beginning JSP",49.99);
    ^
    ProductManager.java:14: cannot resolve symbol
    symbol : class Product
    location: class com.wrox.begjsp.arrayexample3.ProductManager
    productList[1] = new Product(2,"Wrox Press Professional JSP",59.99);
    ^
    ProductManager.java:15: cannot resolve symbol
    symbol : class Product
    location: class com.wrox.begjsp.arrayexample3.ProductManager
    productList[2] = new Product(3,"Wrox Press Beginning Java",39.99);
    ^
    7 errors
    Here is the source code:
    Product.java
    package com.wrox.begjsp.arrayexample3;
    public class Product {
    private int productId;
    private String productName;
    private double productPrice;
    public Product(int prodid, String prodname, double prodprice) {
    productId = prodid;
    productName = prodname;
    productPrice = prodprice;
    public int getProductId(){
    return productId;
    public void setProductId(int ProductId){
    this.productId = ProductId;
    public String getProductName(){
    return productName;
    public void setProductName(String ProductName){
    this.productName = ProductName;
    public double getProductPrice(){ return productPrice; }
    public void setProductPrice(double productPrice){
    this.productPrice = productPrice;
    ProductManager.java
    package com.wrox.begjsp.arrayexample3;
    public class ProductManager{
    private Product[] productList = new Product[3];
    private int productCount;
    public ProductManager() {
    initializeProductList();
    private void initializeProductList() {
    productList[0] = new Product(1,"Wrox Press Beginning JSP",49.99);
    productList[1] = new Product(2,"Wrox Press Professional JSP",59.99);
    productList[2] = new Product(3,"Wrox Press Beginning Java",39.99);
    public Product[] getProductList(){
    return productList;
    public int getProductCount(){
    return productList.length;
    public Product getProductDetails(int prodid) {
    int ProductIndex = -1;
    for(int i=0;i<this.getProductCount();i++) {
    if (prodid == productList.getProductId()) {
    ProductIndex = i;
    break;
    if (ProductIndex != -1) {
    return productList[ProductIndex];
    } else {
    return null;
    Please tell me how to debug it to make it works, thx

    add C:\Tomcat\webapps\examples\WEB-INF\classes to your classpath.
    You can do this through the control panel or by:
    set CLASSPATH=%CLASSPATH%;C:\Tomcat\webapps\examples\WEB-INF\classes

  • How can i Use SERVLET with RMI to avoid trust certificate

    I know that for begining RMI, you must launch the server and the client.
    for the server i use :
    java -Djavax.net.ssl.trustStore=server.keystore -Djavax.net.ssl.keyStore=server.keystore -Djavax.net.ssl.keyStorePassword=server TestServer
    for the client I use :
    java -Djavax.net.ssl.trustStore=client.keystore -Djavax.net.ssl.keyStore=client.keystore -Djavax.net.ssl.keyStorePassword=client TestClient
    and all work fine.
    but i want to use a servlet for rmi client and i wrote this:
    public class AppelServlet extends HttpServlet
         public void doPost(HttpServletRequest request, HttpServletResponse response)
         throws ServletException, IOException
              try
                   System.out.println("Registering secure RMI socket factory ...");
                   java.rmi.server.RMISocketFactory.setSocketFactory(new SecureRMISocketFactory());
              TestRemote test = (TestRemote) Naming.lookup("rmi://127.0.0.1:7123/TestClient");
    String reponse=test.toLowerCase("HELLO WORLD");
                   System.out.println("la reponse est : "+reponse);
         catch (Exception e)
              System.out.println("test client exception: " +e);
    PrintWriter out = response.getWriter();
              response.setContentType("text/html");
    and i have the following error on tomcat:
    Registering secure RMI socket factory ...
    test client exception: java.rmi.ConnectIOException: error during JRMP connection
    establishment; nested exception is:
    javax.net.ssl.SSLHandshakeException: Couldn't find trusted certificate
    i think i must precise how to indicate the truststore like in the first case.
    help me please.
    hamdi

    Hi,
    Try doing the following steps.
    Assuming you have a certificate obtained
    Export the certificate into a .cer file.
    On IE, goto tools->internet options->content->certificates, and export to a .cer file.
    Using keytool of java import the certificate to the store that can be used doing the following command.
    keytool -import -alias <ailas> -file < .cer filename> -keystore <storename here>
    set the javax.net.ssl.trustStore and javax.net.ssl.trustStorePassword properties at the command prompt using the command below.
    java -Djavax.net.ssl.trustStore=<storename> -Djavax.net.ssl.trustStorePassword=<password> <classname>
    Let me know if this helped.
    Also take a look at this link for using RMI with SSL
    http://java.sun.com/products/jdk/1.2/docs/guide/rmi/SSLInfo.html
    Regards,
    Roopasri Vittal
    Developer Technical Support
    Sun Microsystems
    http://sun.com/developers/support

  • How can  I encrypt  files with java ?

    I don't want others to see the content of my file.so,i try to encrypt the file.
    but i don't know how to do .i think there may be two ways to do that .one is coding the file with some encrpytion tachniques .Another is try to add a locker to the file ,when someone try to read it ,the trigger is touched off.This trigger need you to input the password.
    These are my granted think .but i don't how to do.if you know,can you please to share with me? Thank you!

    The JCE is a cryptogrpahic framework for Java. There are numerous tutorials available on the web and a guide is avaiable at http://java.sun.com/j2se/1.4.2/docs/guide/security/jce/JCERefGuide.html .

Maybe you are looking for