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: Using Eclipse to release a project

  1. #1
    Junior Member
    Join Date
    Sep 2020
    Location
    Germany
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Using Eclipse to release a project

    NEWCOMER!!!

    I've just written some Java code in Eclipse and it works on my laptop in the Eclipse IDE. Now I want to install what I've written on my server.

    I know in other development environments you can create setup.exe files. What I don't know is what Eclipse does, I really have no idea, which has made it difficult to Google when I don't know the keywords.

    The code I've written connects to a MySQL database so I'm using a standard JAR file for that, that will probably need to considered when creating my thing to install on my server.

    Does anyone know of a tutorial that explains all of this?

    What are the right keywords for me creating my own set.exe file using Eclipse?

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    23,344
    Thanks
    53
    Thanked 2,487 Times in 2,438 Posts

    Default Re: Using Eclipse to release a project

    What do you mean by "install on server"?
    How is install different from just copying the file to the server's disk?
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Sep 2020
    Location
    Germany
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Using Eclipse to release a project

    Quote Originally Posted by Norm View Post
    What do you mean by "install on server"?
    How is install different from just copying the file to the server's disk?
    Which files do I need to copy over? The ones in the bin directory or the ones in the src directory?

    Will any Linux server be able to interpret that it's an executable file and be able to run it?

    Do I need to use Javac to every time I want to run it? Or do I just type in the name of a file?

    And how will the server know know where the jar file is that I used to connect to the MySQL database?

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    23,344
    Thanks
    53
    Thanked 2,487 Times in 2,438 Posts

    Default Re: Using Eclipse to release a project

    If you create a jar file with your classes and copy that jar file to the server,
    what will trigger the server to execute one of your classes? Will there be a connection between a URL and one of your classes?
    How will you tell the server what is in your jar file?
    How will you tell the server where the jar file is located? Does the server have a special folder for jar files?
    If you don't understand my answer, don't ignore it, ask a question.

  5. #5
    Junior Member
    Join Date
    Sep 2020
    Location
    Germany
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Using Eclipse to release a project

    That is loads of question I don't know the answer to.

    I wrote a simple Java application that ran a stored procedure on MySQL.

    I needed the Jar file to connect to MySQL, I don't know anything about this jar file, all I know is this jar file is what people use to connect to MySQL.

    So with me wanting to move my Java application onto my server it requires this standard MySQL jar to work.

    So how do I move the Java Application I've written over to the server?

  6. #6
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    23,344
    Thanks
    53
    Thanked 2,487 Times in 2,438 Posts

    Default Re: Using Eclipse to release a project

    how do I move the Java Application I've written over to the server?
    Is the Java Application in a jar file?
    What ways does the server have to receive and write files onto its disks?
    FTP is one way to copy files onto a server
    Some servers have special pages you load into a browser that provide a way to copy files onto the server.
    It depends on the server. Is there a help site for the server that you can ask this question?
    If you don't understand my answer, don't ignore it, ask a question.

  7. #7
    Junior Member
    Join Date
    Sep 2020
    Location
    Germany
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Using Eclipse to release a project

    The Java application I've written is not in a Jar file (it uses a standard jar file to connect to MySQL. But it is not in a Jar file it's self.)

    I can easily get files on and off the server because I'm managing the server with Webmin. That is not the problem.

    The problem is I need to create the java version of my own setup.exe so that I can install the Java application I've just written on a different machine (which is a Linux machine).

    I know Linux doesn't use setup.exe files, Linux is different from Windows, but my question is basically how do I create a Linux equivalent of a Setup.exe file from my Java in Eclipse?

  8. #8
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    23,344
    Thanks
    53
    Thanked 2,487 Times in 2,438 Posts

    Default Re: Using Eclipse to release a project

    Sorry, I have never created an .exe file for a java app. I have always used jarfiles to hold the classes.

    Have you tried asking this question on a eclipse site?

    Maybe the http://stackoverflow.com/questions/tagged/java site has an explanation.
    If you don't understand my answer, don't ignore it, ask a question.

  9. #9
    Junior Member
    Join Date
    Sep 2020
    Location
    Germany
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Using Eclipse to release a project

    I know it won't be an .exe file because I'm using Linux. The reason why I mentioned .exe was simply to explain my question again.

    Linux has it's own standards for installation packages which are not .exe, and I need to create a installation file for Linux. But in terms of explaining what my question was, I used the term .exe so that you could understand my original question better.

    So you mentioned jar files, I was under the impression that a Jar file was just a library file equivalent the having a DLL in Windows.

    If it possible to package an entire java application in a Jar file so that the Jar file is the entire installation package?

    And what software do I use to create this installation package?

  10. #10
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    23,344
    Thanks
    53
    Thanked 2,487 Times in 2,438 Posts

    Default Re: Using Eclipse to release a project

    The java command can be used to execute class files contained in a jar file if the jar file has a proper manifest. All of the java apps I use on my PC are contained in jar files. Clicking on the jar file causes the java program to execute the class files contained in the jar file.

    A properly written (no specific OS references) java app contained in a jar file should execute on any PC that has the java command installed.
    That includes with OSs such as Linux and Mac and Windows.

    possible to package an entire java application in a Jar file so that the Jar file is the entire installation package?
    Yes.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Replies: 1
    Last Post: April 6th, 2014, 05:16 PM
  2. Eclipse project creation
    By srikanthk in forum What's Wrong With My Code?
    Replies: 2
    Last Post: January 10th, 2014, 11:21 AM
  3. Lost project in Eclipse ( sorry im new to this) any help welcome
    By MissyK in forum Object Oriented Programming
    Replies: 4
    Last Post: January 10th, 2014, 09:11 AM
  4. How to compile this project inside Eclipse?
    By piulitza in forum Java IDEs
    Replies: 2
    Last Post: August 1st, 2013, 07:26 AM
  5. How to edit eclipse project builds
    By akhilachuthan@yahoo.co.in in forum Java IDEs
    Replies: 1
    Last Post: June 25th, 2009, 09:36 AM