Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FUCoin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DistributedSystems4Students
FUCoin
Commits
961b2e54
Unverified
Commit
961b2e54
authored
8 years ago
by
Freeeed
Browse files
Options
Downloads
Patches
Plain Diff
Fixed hostname config for remote
parent
c6edc0f9
No related branches found
No related tags found
1 merge request
!3
Preliminary result of the software
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/fucoin/MainRemote.java
+13
-5
13 additions, 5 deletions
src/main/java/fucoin/MainRemote.java
with
13 additions
and
5 deletions
src/main/java/fucoin/MainRemote.java
+
13
−
5
View file @
961b2e54
package
fucoin
;
package
fucoin
;
import
java.io.File
;
import
java.util.concurrent.TimeUnit
;
import
akka.actor.ActorRef
;
import
akka.actor.ActorRef
;
import
akka.actor.ActorSelection
;
import
akka.actor.ActorSelection
;
import
akka.actor.ActorSystem
;
import
akka.actor.ActorSystem
;
import
akka.util.Timeout
;
import
akka.util.Timeout
;
import
com.typesafe.config.Config
;
import
com.typesafe.config.Config
;
import
com.typesafe.config.ConfigFactory
;
import
com.typesafe.config.ConfigFactory
;
...
@@ -14,6 +10,10 @@ import fucoin.wallet.WalletImpl;
...
@@ -14,6 +10,10 @@ import fucoin.wallet.WalletImpl;
import
scala.concurrent.Await
;
import
scala.concurrent.Await
;
import
javax.swing.*
;
import
javax.swing.*
;
import
java.io.File
;
import
java.net.InetAddress
;
import
java.net.UnknownHostException
;
import
java.util.concurrent.TimeUnit
;
public
class
MainRemote
{
public
class
MainRemote
{
...
@@ -22,6 +22,14 @@ public class MainRemote {
...
@@ -22,6 +22,14 @@ public class MainRemote {
public
static
void
main
(
String
[]
args
)
throws
InterruptedException
{
public
static
void
main
(
String
[]
args
)
throws
InterruptedException
{
String
hostname
=
"127.0.0.1"
;
try
{
// Fetch IP address to enable network connection
hostname
=
InetAddress
.
getLocalHost
().
getHostAddress
();
}
catch
(
UnknownHostException
e
)
{
e
.
printStackTrace
();
}
//Load configuration from current directory or from resources directory of jar
//Load configuration from current directory or from resources directory of jar
File
file
=
new
File
(
"application.conf"
);
File
file
=
new
File
(
"application.conf"
);
Config
config
=
ConfigFactory
.
parseFile
(
file
);
Config
config
=
ConfigFactory
.
parseFile
(
file
);
...
@@ -33,7 +41,7 @@ public class MainRemote {
...
@@ -33,7 +41,7 @@ public class MainRemote {
}
}
//Init System Actor System
//Init System Actor System
ActorSystem
system
=
ActorSystem
.
create
(
"Remote"
,
config
);
ActorSystem
system
=
ActorSystem
.
create
(
"Remote"
,
ConfigFactory
.
parseString
(
"akka.remote.netty.tcp.hostname="
+
hostname
).
withFallback
(
config
)
)
;
JPanel
dialogPanel
=
createDialogPanel
();
JPanel
dialogPanel
=
createDialogPanel
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment