Comments (2)
Hi.
Right now, you have to create an arbitrary command that runs your java
file. It's a bit of manual effort, but we will add helpers to simplify
this soon.
Here is an example:
- Try cloning from github http://github.com/vparfonov/executable_jar_sample
- In the project configuration, set this project to maven project type.
- You may need to go into the maven settings and specifically set it to a
jar. - Add a command, maven type, title it "build". This will do a mvn clean
install on the project, which should build it. - Add an arbitrary command, title it "run".
You will need to provide the path to the JAR file. It should be something
like, "java -jar projects/target/....". To find the specific location of
the jar, you can navigate in the terminal. The terminal is in the
operations view (upper right corner of IDE). You can navigate the folder
structure there.
In a near release, we'll have the terminal on the main screen, and we'll
also provide helpers for generating these commands that execute files &
folders in your project tree.
Tyler Jewell | CEO | tyler@codenvy.com | 978.884.5355
On Thu, Dec 3, 2015 at 10:36 PM, freewind [email protected] wrote:
I installed the latest eclipse-che and created a simple maven java
project. It contains a very simple Java application:package maven_test;
/** * Hello world! * */public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World!" );
}
}And a test:
package maven_test;
import junit.framework.Test;import junit.framework.TestCase;import junit.framework.TestSuite;
/** * Unit test for simple App. /public class AppTest
extends TestCase
{
/* * Create the test case * * @param testName name of the test case */
public AppTest( String testName )
{
super( testName );
}/** * @return the suite of tests being tested */ public static Test suite() { return new TestSuite( AppTest.class ); } /** * Rigourous Test :-) */ public void testApp() { assertTrue( true ); }
}
I want to run the application or the test, and chose the Java 7 runner.
It works, but finally gives me an error:[DOCKER] Removing intermediate container 75ec0758cf27
[DOCKER] Successfully built ec65a2f775dc
[INFO] Environment preparation done. Application maven-test starting up…
[STDERR] no main manifest attribute, in application.jar
[INFO] Run ended @ Fri Dec 04 06:33:55 UTC 2015
[INFO] Application maven-test has been shutdown.How to configure che to support running a specified Java file?
—
Reply to this email directly or view it on GitHub
#105.
from che.
Hello,
Take a look - https://github.com/vparfonov/executable_jar_sample/blob/master/pom.xml#L17
We package the project into a JAR, and run java -jar application.jar command.
So, adding Main class reference to your pom.xml will fix it. It's not flexible. This is resolved in 4.0 version where you can create custom commands and pass main class as an argument in a command.
Further Maven integration is definitely on the roadmap, smth like running test for a chosen class or a method.
from che.
Related Issues (20)
- ReportPortal Access Request - Web Terminal HOT 2
- Set up SMTP server for invating members in the Report portal
- Study Report portal documentation
- Find solution for extracting text from the WebTerminal
- Investigate and implement if it is possible UI test in DWO project
- Apply test framework which can implement our CI Stability Quality Metric requrements
- ReportPortal: Train the tool - Web Terminal
- Investigate possibility of running DevFile acceptance tests without Che server
- Che-Code automatic rebase against upstream VS Code is failed
- Allow to configure securityContext for che-gateway container HOT 6
- Rewrite WTO tests under admin user HOT 1
- Unexpected workspace restart due to scale down of a replicaset HOT 11
- Allow pod-overrides of `volumes` and container-overrides of `volumeMounts` in Devfiles HOT 7
- Can't use universal-developer-image:ubi8-latest with sqlite HOT 7
- Failed to start a workspace via factory with devfile 2.2.2 HOT 2
- Remove devfile schema validation from che-server
- Make it possible to connect to a container via SSH HOT 1
- Advanced Authorization Blog Post HOT 1
- The UD does not have a length limitation for auto-generated names
- Update and check the e2e test image
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from che.