Java – how to make my program run outside eclipse

I have a solar eclipse project When I click the green circle play button in the IDE, it will do everything I want it to do - open a window, play content, everything But as far as I can, I can't figure out how to do this outside the eclipse

My project uses processing Core library to do some of its work, but I can't let the project run in the processing IDE, because some stupid things of one of my classes can't be an effective substitute for type parameters Collections. Sort (list < T & gt) It would be nice if someone knew how to export it from the processing ide

I need to be able to e-mail / upload to the Internet / transfer some kind of file / folder / Web page, allow recipients to view the window without much technical knowledge or work, or allow them to view the content to interact with the program in the same way as the window started by eclipse when I press the play button at the top

I've tried several different ways to do this, but none of them worked I try to export a runnable Jar, but it doesn't allow me to include referenced libraries I tried a routine Jar, but I don't know how to package it with anything that can see it I even tried to use the fat jar Eclipse Plug-in, but I encountered some errors because I couldn't find the main papplet class of the project

If someone knows how to get what I want to happen, or how to do a good tutorial I want to do, I will appreciate any form of help or guidance or anything

Google has never helped to put forward a solution to this problem, because most of the results I find are that others ask the same or similar questions, and then either don't answer them, or I've tried, and there is no exact indication of what options or settings I need to complete the task

I am using version 2.0b7 of processing core. Jar, but I don't think it will make a difference, although I'm going to try different versions if I can't figure out anything else

Copies of my project folders can be found in https://www.dropbox.com/sh/1n4curhxbgi8fye/A5F6_l7xQu find

All the data I have is that I http://earthquake.usgs.gov/earthquakes/catalogs/eqs7day-M1.txt Something connected from successive versions of a file

Solution

I've done a quick test of OSX and have to adjust your eclipse project slightly:

>You use an absolute path to link to Jar library I recommend using the reserved library relative to the project > I encountered some memory problems and had to add several compiler flags > in earthquaker Java adds a main method to initialize as an application

The main looks like this:

public static void main(String[] args) {
        PApplet.main(Earthquaker.class.getSimpleName());
    }

In eclipse, you can export the runnable jar. Jar through File > Export > java > runnable jar file Here are some screenshots:

Personally, I prefer to use the "copy required libraries to subfolders..." option in case I need to update some independent of the main application Jar dependency jar.

As a reference, I uploaded the modified eclipse project here (Java SDK needs to be changed) The exported runnable jar with bash script can be used here

Here is the bash script itself, which should also run on Linux:

java -Xms128M -Xmx1024M -jar Processing-DataVisualization.jar

Very cool project, by the way

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>