Java program Compiling using Maven

Hi,
I am upgrading 1.4 to 1.5 java. And in my local pc i have compiled programs and able to eploy the application. But the problem is in server when i try to compile using maven it gives a compilation error.
If you are saying that it is an issue of maven then also i wanted to discuss this strange issue here.
/usr/build/Application/java/com/sql/DataStoreInterface.java:686: warning: unmappable character for encoding UTF8
    [javac] �* Inserts a blank row at the specified position of the DataStore's result set buffer. Returns the number of the row added.The statement is commented but the compiler is not identified the same. When i checked encoding type using file --mime {filename} i got it like text/x-java; charset=iso-8859-1. This is not the case for all some java file types are text/x-c++; charset=us-ascii but that is not giving error.
One more issue is elicited below.
] cast to java.lang.Object for a varargs call
    [javac] cast to java.lang.Object[] for a non-varargs call and to suppress this warning
    [javac]                     meth.invoke(comp, n);
    [javac]                                       ^Can any one suggest how can i solve this two issues.
Thanks
Rasa.

rasa wrote:
Hi,
I am upgrading 1.4 to 1.5 java. And in my local pc i have compiled programs and able to eploy the application. But the problem is in server when i try to compile using maven it gives a compilation error.
If you are saying that it is an issue of maven then also i wanted to discuss this strange issue here.
/usr/build/Application/java/com/sql/DataStoreInterface.java:686: warning: unmappable character for encoding UTF8
[javac] � ...� above might be a broken copyright #) symbol. In java code comments, I'd replace it with word *(copyright)*
#) broken copyright symbol -- I've seen it broken that way in one project. I remembered this because one of colleagues made a funny remark on it. There was something like:
...it's not a bug, these are sacral signs with a very special meaning.
Let me explain:
- i with two dots means we spotted all i's and some more
- reverted question sign means there are no questions left anymore
- "1/2" is a math symbol for square root meaning we've got to the roots of the Universe with our product

Similar Messages

  • Java programming language uses call by reference for objects?

    Is Java programming language uses call by reference for objects?

    Yes. You make calls to an object via itsreference.
    No.Yes, you're referring to passing a reference into a
    method in which case the value of the
    reference is passed.I believe the OP is using the term "call by reference" to mean "pass by reference." The two are interchangable, AFAIK. So, while "making calls to an object via its reference" is correct, I don't believe it's germane to the question.

  • Writing java program that uses UMTS service

    Hi
    I wonder if it is possible to write java programs that use UMTS services. Is there any class-package in java related with UMTS services?

    you can call a batch file using NT service. the batch file executes the java program. and you can also send an email thru that java program.

  • Is it possible to run a java program without using the command prompt?

    Hi,
    I was wondering whether it is possible to run a Java program (not an applet) without using a command line in the command prompt?
    Basically I want to run a program that will be continually running in the background and hence I don't want to have a command prompt screen loaded up as well - I just want the program to be running in the task bar.
    I know how to run the program in the task bar - but I still need to launch the program from the command prompt - is there anyway I can get a program running without having to start it from the command prompt?
    Cheers

    Or create a desktop shortcut (in Windows) or an application launcher ( in Linux GUI).

  • Steps to read PDF using Java Program that uses LifecycleES Jboss server

    Can anyone please mention the steps to setup the Jboss server in Lifecycle ES suite....
    i have program to read PDF that has following contents --and it Fails to connect to LiveCycle server via RMI. Please help me out.....
    Properties connectionProps = new Properties();
    connectionProps.setProperty(ServiceClientFactoryProperties.DSC_DEFAULT_EJB_ENDPOINT, "jnp://localhost:1099");
    connectionProps.setProperty(ServiceClientFactoryProperties.DSC_TRANSPORT_PROTOCOL,ServiceC lientFactoryProperties.DSC_EJB_PROTOCOL);
    connectionProps.setProperty(ServiceClientFactoryProperties.DSC_SERVER_TYPE, "JBoss");
    connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_USERNAME, "administrator");
    connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_PASSWORD, "password");
    //Create a ServiceClientFactory instance
    ServiceClientFactory factory = ServiceClientFactory.createInstance(connectionProps);

    Vinay,
    i dont think that any body can read and write pdf files by java program.b'coz pdf files will have its own proprietery encoding format.
    Here is something u gotto remember when u post an answer to somebody's question. Never ever answer until u r very sure about something or u r a nerd in that area. Don't give a trivial or a insensible answer.
    Hope u learn the forum etiquette.
    Thanks,
    Kulk.

  • How can I make a Java program pyramid using for loops??

    Hi guys, so I'm stuck with my program here... I don't know how to make it work, and i've been trying really hard.. So now i give up and need some guidance.. Please help me here.
    Your job in this assignment is to write programs to solve each of these six problems.
    1. Write a GraphicsProgram subclass that draws a pyramid consisting of bricks
    arranged in horizontal rows, so that the number of bricks in each row decreases by
    one as you move up the pyramid, as shown in the following sample run:
    The pyramid should be centered at the bottom of the window and should use
    constants for the following parameters:
    BRICK_WIDTH The width of each brick (30 pixels)
    BRICK_HEIGHT The height of each brick (12 pixels)
    BRICKS_IN_BASE The number of bricks in the base (14)
    The numbers in parentheses show the values for this diagram, but you must be able
    to change those values in your program.
    * File: Pyramid.java
    * Name:
    * Section Leader:
    * This file is the starter file for the Pyramid problem.
    * It includes definitions of the constants that match the
    * sample run in the assignment, but you should make sure
    * that changing these values causes the generated display
    * to change accordingly.
    import acm.graphics.*;
    import acm.program.*;
    import java.awt.*;
    public class Pyramid extends GraphicsProgram {
    /** Width of each brick in pixels */
         private static final int BRICK_WIDTH = 30;
    /** Width of each brick in pixels */
         private static final int BRICK_HEIGHT = 12;
    /** Number of bricks in the base of the pyramid */
         private static final int BRICKS_IN_BASE = 14;
         public void run() {     
    }That's my problem.

    yo, so i figure out my for loop. my code is very very very very ugly, so dont laugh i know its ugly! just wanna ask for some tips
    public void run() {
              int initBrick = 30;
              int initPlacement = (getWidth() - BRICK_WIDTH) / 2;
              for (int i = 0; i < initBrick; i += 30)
                   int initX = i;
                   int x = initX + initPlacement;
                   GRect brick = new GRect(x, 0, BRICK_WIDTH, BRICK_HEIGHT);
                   add(brick);
              for (int i = 0; i < 60; i += 30)
                   int initX = i;
                   int x = (initX + initPlacement) - 15;
                   int y = 12;
                   GRect brick = new GRect(x, y, BRICK_WIDTH, BRICK_HEIGHT);
                   add(brick);
              for (int i = 0; i < 90; i += 30)
                   int initX = i;
                   int x = (initX + initPlacement) - 30;
                   int y = 24;
                   GRect brick = new GRect(x, y, BRICK_WIDTH, BRICK_HEIGHT);
                   add(brick);
              for (int i = 0; i < 120; i += 30)
                   int initX = i;
                   int x = (initX + initPlacement) - 45;
                   int y = 36;
                   GRect brick = new GRect(x, y, BRICK_WIDTH, BRICK_HEIGHT);
                   add(brick);
              for (int i = 0; i < 150; i += 30)
                   int initX = i;
                   int x = (initX + initPlacement) - 60;
                   int y = 48;
                   GRect brick = new GRect(x, y, BRICK_WIDTH, BRICK_HEIGHT);
                   add(brick);
              for (int i = 0; i < 180; i += 30)
                   int initX = i;
                   int x = (initX + initPlacement) - 75;
                   int y = 60;
                   GRect brick = new GRect(x, y, BRICK_WIDTH, BRICK_HEIGHT);
                   add(brick);
              for (int i = 0; i < 210; i += 30)
                   int initX = i;
                   int x = (initX + initPlacement) - 90;
                   int y = 72;
                   GRect brick = new GRect(x, y, BRICK_WIDTH, BRICK_HEIGHT);
                   add(brick);
              for (int i = 0; i < 240; i += 30)
                   int initX = i;
                   int x = (initX + initPlacement) - 105;
                   int y = 84;
                   GRect brick = new GRect(x, y, BRICK_WIDTH, BRICK_HEIGHT);
                   add(brick);
              for (int i = 0; i < 270; i += 30)
                   int initX = i;
                   int x = (initX + initPlacement) - 120;
                   int y = 96;
                   GRect brick = new GRect(x, y, BRICK_WIDTH, BRICK_HEIGHT);
                   add(brick);
              for (int i = 0; i < 300; i += 30)
                   int initX = i;
                   int x = (initX + initPlacement) - 135;
                   int y = 108;
                   GRect brick = new GRect(x, y, BRICK_WIDTH, BRICK_HEIGHT);
                   add(brick);
              for (int i = 0; i < 330; i += 30)
                   int initX = i;
                   int x = (initX + initPlacement) - 150;
                   int y = 120;
                   GRect brick = new GRect(x, y, BRICK_WIDTH, BRICK_HEIGHT);
                   add(brick);
              for (int i = 0; i < 360; i += 30)
                   int initX = i;
                   int x = (initX + initPlacement) - 165;
                   int y = 132;
                   GRect brick = new GRect(x, y, BRICK_WIDTH, BRICK_HEIGHT);
                   add(brick);
              for (int i = 0; i < 390; i += 30)
                   int initX = i;
                   int x = (initX + initPlacement) - 180;
                   int y = 144;
                   GRect brick = new GRect(x, y, BRICK_WIDTH, BRICK_HEIGHT);
                   add(brick);
              for (int i = 0; i < 420; i += 30)
                   int initX = i;
                   int x = (initX + initPlacement) - 195;
                   int y = 156;
                   GRect brick = new GRect(x, y, BRICK_WIDTH, BRICK_HEIGHT);
                   add(brick);
         }So yeah, it's very ugly. not general. BUT now; I know the logic of the program..
    I need to change 3 variables here.
    the Y var, the X variable, and the size of the loop test..
    so I need to make a one compact for loop that will change those 3 for every time the loop finish, or for every row the variable will change...
    Ill try to think again, ill head to the balcony, and squeeze my brain. YEAH it took me this long to figure this out, anyway im a noob YET. But i was working a while ago.
    ANYWAY, leave some tips please.. I NEED TIPS NOT SOLUTION

  • Java program compiles but failes to run

    WHAT IS WRONG WITH THIS PROGRAM? It compiles;
    however, when I try to run it, I get the message"
    static void main not define in class car. Please help!
    class Car {
    int passanger;
    int mpg;
    int gas;
    void range() {
    System.out.println("Distance of =:" + mpg*gas);
    class Models {
    public static void main(String args[]) {
    Car Toyata=new Car();
    Car Mazada=new Car();
    Toyata.passanger=8;
    Mazada.passanger=6;
    Toyata.mpg=30;
    Mazada.mpg=25;
    Toyata.gas=16;
    Mazada.gas=17;
    System.out.println("Toyata can carry" +Toyata.passanger);
    Toyata.range();

    The program gets compiled into two classes: Car.class & Models.class.
    class Car {
    int passanger;
    int mpg;
    int gas;
    void range() {
    System.out.println("Distance of =:" + mpg*gas);
    class Models {
    public static void main(String args[]) {
    Car Toyata=new Car();
    Car Mazada=new Car();
    Toyata.passanger=8;
    Mazada.passanger=6;
    Toyata.mpg=30;
    Mazada.mpg=25;
    Toyata.gas=16;
    Mazada.gas=17;
    System.out.println("Toyata can carry" +Toyata.passanger);
    Toyata.range();
    java Car does not produce output because the main method is in the Models.class.
    java Modelsproduces output
    Toyaota can carry 8
    Distance of :=480

  • Trying to get my first java program compile.

    I just iinstalled j2sdk1.4.2_05 on Wind 98 and I have set the path variable in autoexec.bat and ran the .bat.
    So, now the system recognizes the javac compiler but I am still not able to run a program Welcome.java
    I created a Welcome.java file and stored it in C:\java\Welcome.java
    I also set the sourcepath to sourcepath=c:\java; in my autoexec.bat file.
    When I compile the following way, I get the following error:
    c:\javac Welcome.java
    Error: Cannot read: Welcome.java
    Can anybody please tell me what I am doing wrong. Do i need to set any thing else.
    Radhika.

    I got it to compile and run....successfully.
    Problem was- When I created the file Welcome.java in Notepad, it created with the following extension-
    Welcome.java.txt. I renamed it to Welcome.java and it compiled and ran fine.
    Thanks,
    Radhika.

  • How to write a Mail Java program without using the JavaMail api?

    Can I do that?
    if so, which classes should be used?
    and how can i use Javamail to write a program which
    allows me to write Email.

    You can open up raw sockets to an SMTP server to send email.
    Here is one article that has code for how to send email using sockets.
    http://www.javaworld.com/jw-12-1996/jw-12-sockets.html

  • How to use java api while java programming especially using javase and java swing?

    i need help for java api for undo, redo, htmleditorkit,editorkit.
    in my project i have to use java swing for desktop application but, i need help for how to implement and how to retrieve java api.
    please reply with example or code..

    i need help for java api for undo, redo, htmleditorkit,editorkit.
    in my project i have to use java swing for desktop application but, i need help for how to implement and how to retrieve java api.
    please reply with example or code..
    You find examples and code by searching the internet, not by using forums.
    Start with The Java Tutorials - it has trails for the bulk of the Java functionality.
    See the trail 'How to Write an Undoable Edit Listener'
    http://docs.oracle.com/javase/tutorial/uiswing/events/undoableeditlistener.html
    You learn by DOING - not by reading. Actually DO the tutorial example and try to understand WHAT it does and HOW it does it.
    Then search for other tutorial trails that are of interest.

  • Compiling one java program by another

    hi ppl
    how to compile a java program by another java program by using javac command.
    that is prog A must compile prog B using " javac B.java" command

    Try com.sun.tools.javac.Main.
    You require JDK_HOME/lib/tools.jar in CLASSPATH.

  • Creating java program that orders 3 numbers in ascending order using if els

    Does anyone know what code to use for creating a java program that uses the if else operators to order 3 variables in ascending order?

    nar0122 wrote:
    correct on the homework assumption...you have a good nose...the thing is...i know i need to make an if statement saying if a is less than b, and a is less than c...print a first...but how do i get it to "print a" first? if a is less than c and b...and so on for b and c? sorry if that was confusing...
    int a = ..., b = ..., c = ...;
    if(a > b AND a > c) {
      print a
      if(b > c) {
        print b, print c
      } else {
        print c, print b
    etc.

  • Need to change the directory using the java program

    hi,
    can anyone give me the code to change the directory in the java program by using the system command.
    as in C where we use the system call system("cd");
    the same way how to do that in java. please help me with that!!!

    Please search the forums for "runtime.exec", there are dozens of examples posted.
    Although this may not do you any good, since changing the os's directory is not likely to change anything you're using in Java. What are you trying to do?

  • JSP codes for running a JAVA program

    hello...
    does anyone know the JSP codes for running a Java program from my web page?? i mean i already have my java program compiled... and i just want this java program to run in the background when I click on a button or a link...
    Any idea about this?
    plz advice..
    avi

    yes... u r somewhat right... but this runs on Jakarta Tomcat...
    i'm using the Apache Http Server together with the ServletExec AS which enable the Apache server to run JSP..
    I've created a package where i've put my classes...
    WEB-INF/classes/tbd(package name)/my classes
    and i've added.. package name.. in my java program..
    and then in jsp... i've written..
    <%@ page import="tdb.*"%>
    <jsp:useBean id="exec" class="tdb.textdb" />
    <%exec.convert_data();%>
    but when i run the page it says the package does not exist...
    can anyone tell where to place the folder WEB-INF so that it can run fine?
    thx
    avi

  • Java programming

    I am new to Java programming and using the compiler "javac" from the command prompt. When I get morethan 6 or 7 errors the screen scrolls so fast I cannot read the first error message. Is there a way I can use to pause the screen or redirect the error messages to a text file?
    My second question is how do you convert a double value to an integer value. I tried "intValue" but it's not working. Please reply as soon as possible.

    I am new to Java programming and using the compiler
    "javac" from the command prompt. When I get morethan 6
    or 7 errors the screen scrolls so fast I cannot read
    the first error message. Is there a way I can use to
    pause the screen or redirect the error messages to a
    text file?
    If its WIN 2000 or NT first execute your programs from batch files. last line of batch file should be "pause". while the window is still open, right click on the top left corner and increase the buffer size.
    If that doesent work you can try
    javac classfile > outputfile
    That might work on windows systems
    My second question is how do you convert a double
    value to an integer value. I tried "intValue" but it's
    not working. Please reply as soon as possible.Math.round()

Maybe you are looking for

  • Can't target main stage from dynamically loaded swf...

    A part of the Flash app. I'm working on right now does the following - Main stage loads an external swf using the following function: function loadAsset(evt:String):void{ var assetName:String = evt; if (assetName != null){   var assetLdr:Loader = new

  • Radio button in screen painter

    if we create number of Radio buttons in the screen painter using the drag and drop , then should we group up all the radio buttons , if so pls let me know how to group up all the radio buttons . I created 3 radio buttons using drag and drop in screen

  • ABAP Coding in Endroutine

    Hello Gruru's I have some questions. I load from a DSO into a itab in my endroutine. Now I want to count the Key's in this itab. How can I do this ? Exampl: KEY1       KEY2 4711         ABC 4711         ZZZ 4711         BBB Need Count the KEY1 KEY1  

  • Is there a screensnap app which uses date/time as the filename?

    I'm looking for a simple screensnap app which uses the current date/time as the filename... e.g. 010220120500 or something similar.

  • Not restarting; loud beeping when attempting to restart

    I was running a DVD on my macbook when it froze. after doing everything I could to restart it (force quit, trying to eject the disc, etc.), I shut down my computer to restart it. Now every time I try to turn it on, it goes to the gray screen (without