Skip to content
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

NormStreamSend Java Example Does Not Compile #76

Closed
mullerj opened this issue Jan 16, 2023 · 2 comments
Closed

NormStreamSend Java Example Does Not Compile #76

mullerj opened this issue Jan 16, 2023 · 2 comments

Comments

@mullerj
Copy link
Contributor

mullerj commented Jan 16, 2023

The NormStreamSend Java example does not compile.

Used the Waf build tool to configure to build the Java extension:
./waf configure --build-java
Command was successful:
'configure' finished successfully (5.141s)
Built the Java extension using the Waf build tool:
./waf
Command was successful:
'build' finished successfully (58.831s)
Switched to the Java examples directory and attempted to compile the Java examples based on the README.TXT:
javac -cp ../../build/norm.jar *.java
Received the following error about NormStreamSend:

NormStreamSend.java:49: error: incompatible types: possible lossy conversion from int to short
                                                                SEGMENT_SIZE, BLOCK_SIZE, PARITY_SEGMENTS);
                                                                              ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error

Changed NormStreamSend BLOCK_SIZE to short on line 13:
static final short BLOCK_SIZE = 64;
Attempted to compile the Java examples again:
javac -cp ../../build/norm.jar *.java
Received the following error about NormStreamSend:

NormStreamSend.java:49: error: incompatible types: possible lossy conversion from int to short
                                                                SEGMENT_SIZE, BLOCK_SIZE, PARITY_SEGMENTS);
                                                                                          ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error

Changed NormStreamSend PARITY_SEGMENTS to short on line 14:
static final short PARITY_SEGMENTS = 16;
Attempted to compile the Java examples again:
javac -cp ../../build/norm.jar *.java
Build was successful.

@bebopagogo
Copy link
Collaborator

I see you determined the issue and will check out your pull request. Note that the main Java example I am paying attention to is the "examples/java/NormMsgr.java". I have three more complete examples that I am trying to replicate in C/C++, Python, and Java:

1). normMsgr
2) normStreamer
3) normCast

At the moment only normMsgr is represented in all three but I hope to find time (or volunteers) to address this. The simpler examples are not really complete with respect to some key aspects of controlling/using NORM protocol operation. That's where these more complete examples can help.

@mullerj
Copy link
Contributor Author

mullerj commented Jan 16, 2023

Thanks for the context about the examples. I'd like to help out. I'm just getting started with the Java examples. They are all compiling now, but I'm having some trouble loading the libraries. I added a Q&A in the discussions: #75

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants