java


How Convert Microsoft GUID to JAVA UUID?


I need to communicate a Guid that was generated in .NET to a Java application.
This is my GUID
ce095552-b466-4d03-ac41-430ec9286806
and I want to set it to UUID variable !
UUID.nameUUIDFromBytes(stringUUID.getBytes())
UUID.fromString(stringUUID)
I am getting error
Caused by: java.lang.NumberFormatException: Invalid long: ""ce095552"
how can I cast GUID to UUID?
UUID.fromString() works fine:
String guid = "ce095552-b466-4d03-ac41-430ec9286806";
UUID uuid = UUID.fromString(guid);
System.out.println(uuid);
Invalid long: ""ce095552"
Looks like the GUID you are passing to UUID.fromString still includes quotes ("). Make sure the GUID string does not include any additional characters and it should work.

Related Links

jboss cache location pointing to env var
How to create a bidirectional one-to-many relationship with a composite id in the parent?
singleton public static final
How to load polygon objects from Tiled in Slick2d?
Swing - Wrap JTextArea when using BoxLayout [duplicate]
Edit AST by using visitors in Antlr
Positioning of a JLabel on a JPanel
Spring MVC (RESTful API): Validating payload dependent on a path variable
How to dynamically add Entity in Hibernate?
HttpDelete a parameter with setEntity on android?
Clarification over In-Order traversal in binary search tree
Parsing HTML and breaking lines in HTML text
Java - Streaming Linear Regression
I am trying to navigate to multiple activities using intents and i am getting a run time exception, I am a beginner with eclipse , so please guide me
Word counter program not producing correct number of words
How To Access Sub Class Variable From Generic Super Class

Categories

HOME
openlayers
wso2
vbscript
ngrx
single-sign-on
json.net
session
bookshelf.js
jira
rubygems
webpack-2
sql-server-2016
baqend
blueprintjs
ios-charts
medical
facebook-php-sdk
tomcat6
reveal.js
netflix
clearcase-ucm
systemc
footer
reactcsstransitiongroup
pythonanywhere
emulator
swiftlint
xlsxwriter
one-hot-encoding
cloudhub
kudan
microsoft-r
icloud-api
javacv
underflow
django-storage
linkerd
primitive
flink-streaming
fog
commit
force-layout
mpmediaquery
file-format
dartium
serve
retina-display
multilingual
hockeyapp
objectlistview
galen
unixodbc
import-from-excel
gpx
angular2-meteor
hibernate-tools
upstart
aurelia-validation
worker-thread
pg-dump
r-forge
cudafy.net
sqldf
eventkit
specrun
root-framework
wdf
heidisql
android-textview
holder.js
pagerank
ios4
system.management
teamcity-8.0
google-places
icu4j
map-projections
cakephp-3.1
myo
fluid-dynamics
bridge.net
c++03
geonetwork
knuth
codeigniter-routing
mesa
has-many-through
bundles
cloud-connect
dir
blending
ftps
back-stack
sharp-repository
drools-planner
simba
hosts-file
ocx
data-loss
external-accessory
inotifycollectionchanged
site.master
google-friend-connect
jquery-ui-droppable
bespin
msdev
wsdl.exe

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App