-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core HA example doesn't run on command line #89
Comments
Yes, here are the right command line:
and
not really convenient, will find a different way. |
(cluster-host is required on my computer because of my fancy network configuration) |
I think for Java examples like this it doesn't really make sense to run them on the command line. Running in the IDE would be much simpler, so probably just easier to update the README so it talks about running in the IDE only. |
Ok, but I need to start a bare instance from the IDE, and then kill a processus started by the IDE. |
Just a thought. The main issue in running the Java examples from the command line is that they reference the ExampleRunner class... Maybe instead of using that class we can use Launcher directly and change Launcher so it looks at vertx.cwd? Then we wouldn't have deps on other classes. |
We could also put the logic for cwd that resolves the cwd as I mentioned in another issue so this works seamlessly on Eclipse, NetBeans and IntelliJ? |
It would give something like:
WDYT ? |
Yes, like that, but I was thinking we should put the adjustment (i.e. the code inside the try..catch block) inside Launcher. Also you wouldn't need the "web-examples/src/main/java" part. |
We can do it in Launcher or in a "run-example" command. It would give something like:
It can traverse the file system to find the associated Server.java file and set the |
* Use Launcher * Add IDE and command line instructions Related to #89
I've fixed the HA example, using the Launcher. I've provided the instructions for the IDE and command line. |
Perfect |
I notice the other examples are still using the ExampleRunner (as reported on a user report in the google group today) |
Yes, the ExampleRunner is still used. The "intelligent cwd detection" has been implemented here. |
Ah ok. I thought we were going to implement in Launcher (as mentioned in your example above)? Then the example only has dependencies on core code and is much easier to run without having to depend on ExampleRunner.... |
Yes, but it was too close to the 3.1 deadline to implement this in the launcher. It will be in 3.2 (it's on my todo list). |
It's not the same issue. This one was about running HA which has been fixed. Replacing the ExampleRunner should be another issue (I'm going to create one for this) |
Closing this one as the replacement of the ExampleRunner is covered by #97 |
If you follow the instructions to run it as described in the README it fails when starting the first Server:
/home/tim/projects/vert-x3/vertx-examples/core-examples/src/main/java/io/vertx/example/util/Runner.java:15: error: cannot find symbol
ExampleRunner.runJavaExample(CORE_EXAMPLES_JAVA_DIR, clazz, true);
^
symbol: variable ExampleRunner
location: class io.vertx.example.util.Runner
/home/tim/projects/vert-x3/vertx-examples/core-examples/src/main/java/io/vertx/example/util/Runner.java:19: error: cannot find symbol
ExampleRunner.runJavaExample(CORE_EXAMPLES_JAVA_DIR, clazz, false);
^
symbol: variable ExampleRunner
location: class io.vertx.example.util.Runner
/home/tim/projects/vert-x3/vertx-examples/core-examples/src/main/java/io/vertx/example/util/Runner.java:25: error: cannot find symbol
ExampleRunner.runScriptExample(CORE_EXAMPLES_JS_DIR, scriptName, false);
The text was updated successfully, but these errors were encountered: