Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 10 of 10

Thread: Build Java App Exception

  1. #1
    Junior Member
    Join Date
    Feb 2021
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Build Java App Exception

    Good guys, I'm new to this community and I hope to be able to communicate nicely, well, I come here to present you my problem is that my application is finished and I want to build it, but here there is a problem that does not allow me:
    An input/output error occurred.:
    Consult the following stack trace for details.
    java.nio.charset.MalformedInputException: Input length = 1
    at java.base/java.nio.charset.CoderResult.throwException(CoderR esult.java:274)
    at java.base/sun.nio.cs.StreamDecoder.implRead(StreamDecoder.ja va:339)
    at java.base/sun.nio.cs.StreamDecoder.read(StreamDecoder.java:1 78)
    at java.base/java.io.InputStreamReader.read(InputStreamReader.j ava:181)
    at java.base/java.io.BufferedReader.fill(BufferedReader.java:16 1)
    at java.base/java.io.BufferedReader.read(BufferedReader.java:18 2)
    at jdk.compiler/com.sun.tools.javac.main.CommandLine$Tokenizer.<in it>(CommandLine.java:143)
    at jdk.compiler/com.sun.tools.javac.main.CommandLine.loadCmdFile(C ommandLine.java:129)
    at jdk.compiler/com.sun.tools.javac.main.CommandLine.appendParsedC ommandArgs(CommandLine.java:71)
    at jdk.compiler/com.sun.tools.javac.main.CommandLine.parse(Command Line.java:102)
    at jdk.compiler/com.sun.tools.javac.main.CommandLine.parse(Command Line.java:123)
    at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:21 5)
    at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:17 0)
    at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57)
    at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:43)
    BUILD FAILED (total time: 2 seconds)

    I do not understand why this is, if you could help me.

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Build Java App Exception

    I do not understand why this is
    Have you looked up the API doc for the MalformedInputException class to see why it is thrown?
    What program are you executing that gives that error message?
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Feb 2021
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Build Java App Exception

    Have you looked up the API doc for the MalformedInputException class to see why it is thrown?

    A marked exception is thrown when an input byte sequence is not legal for a given character set, or an input character sequence is not a legal sixteen-bit Unicode sequence, that's what I don't understand where it is giving this.
    What program are you executing that gives that error message?

    What program am I basically using java, NetBeans, and the jar for the database connection that and nothing else? On the other hand, in other applications that I have developed when building if it works correctly.

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Build Java App Exception

    Can you open a command prompt window and use the javac command to compile your java program?

    I don't use Netbeans and do not know how to use it.
    If you don't understand my answer, don't ignore it, ask a question.

  5. #5
    Junior Member
    Join Date
    Feb 2021
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Build Java App Exception

    nothing does execute the following problem appears

    "error: cannot find symbol
    FormLogin login= new FormLogin(frame);
    ^
    symbol: class FormLogin
    location: class Initial "
    ---------------------------
    this my code :
    package com. app.capa1_presentacionn;

    import javax.swing.JFrame;

    /**
    *
    * @author josel
    */
    public class Initial {
    public static void main(String[] args) {
    JFrame frame = new JFrame();
    FormLogin login= new FormLogin(frame);
    login.setVisible(true);
    }
    }

    "" but when I run the application from NETBEANS running that file if it works correctly ""

  6. #6
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Build Java App Exception

    Where is the FormLogin class's definition? The compiler can not find it.
    What was on the commandline when that program was compiled? Was the classpath set for the javac command so it could find the definition for the FormLogin class?
    If you don't understand my answer, don't ignore it, ask a question.

  7. #7
    Junior Member
    Join Date
    Feb 2021
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Build Java App Exception

    Hello, Well I don't really understand how to work with javac, but I understand that I have to initialize from the main class, but this class is connected with many packages, so I have the following error:

    error: cannot find symbol
    FormLogin login= new FormLogin(frame);
    symbol: class FormLogin
    location: class Initial

    however i have used the follow :
    javac capa1_presentacion/util/*.java capa1_presentacionn/*.java capa2_aplicacion/*.java capa3_dominio/entidades/*.java capa4_persistence/jdbc/*.java capa4_persistence/jdbc_mysql/*.java
    well the following command gives me many errors, I don't know if it is well defined , I'm work with architecture and-layers
    Last edited by dash166; February 26th, 2021 at 02:43 PM.

  8. #8
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Build Java App Exception

    I asked you to use the javac program to read the java source file that was being read when you got the error to see if that file's contents was causing the problem. The test you did with the javac program with the file causing the problem in post#1 did have the same problem as posted in the first post.
    I can only guess that the problem is in the IDE you were using.

    Try posting your problem here: https://coderanch.com/forums
    there are more people there that use and understand Netbeans.
    If you don't understand my answer, don't ignore it, ask a question.

  9. #9
    Junior Member
    Join Date
    Feb 2021
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Build Java App Exception

    Well, thank you very much for the help, at last I tried to solve it, I will tell you in what way, basically, I had to test my application in small parts to better understand what had been developed, and well, basically, it was next to my classes or jframes had called them FormAdd and well that was the only problem how to name them I could not call them with the letter "ñ" for that reason I sent this exception, I hope it does not happen as my problem to others, during all my years of java I had never noticed or they would have mentioned me in a single letter it hurt you all , I tried hard enough to understand the problem and try to fix it
    well thanks my friend ...

  10. #10
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Build Java App Exception

    Thanks for the explanation.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Difference between Maven Build and Eclipse Build
    By Beginner2java in forum Java IDEs
    Replies: 2
    Last Post: October 14th, 2013, 10:13 AM
  2. Difference between Maven Build and Eclipse Build
    By Beginner2java in forum What's Wrong With My Code?
    Replies: 2
    Last Post: October 14th, 2013, 10:13 AM
  3. Difference between Maven Build and Eclipse Build
    By Beginner2java in forum Java IDEs
    Replies: 1
    Last Post: October 14th, 2013, 10:09 AM
  4. Difference between Maven Build and Eclipse Build
    By Beginner2java in forum What's Wrong With My Code?
    Replies: 1
    Last Post: October 14th, 2013, 10:09 AM
  5. trying to build a hash table, getting null pointer exception on search
    By kevingregg in forum What's Wrong With My Code?
    Replies: 1
    Last Post: June 19th, 2013, 01:18 PM

Tags for this Thread