如何使用java.rmi.Naming.lookup()查找带空格的名称?

时间:2018-02-06 01:45:07

标签: java rmi naming

我在服务器端使用这些代码注册RMI对象:

IHello stub = (IHello)Naming.lookup("rmi://localhost:20222/A Say Hello Remote Object");

当我从客户端获取此远程对象时:

java.net.MalformedURLException: invalid URL STring rmi://localhost:20222/A Say Hello Remote Object.

这将引发异常:

regitry.lookup("A Say Hello Remote Object")

在客户端,我可以使用Naming.lookup()来查找此对象。但为什么ui <- fluidPage( fluidRow( column(4, uiOutput("projectSelection"), uiOutput("addSelect"), uiOutput("checkbox") ) ), fluidRow( tags$div(id="rowLabel") ) ) server <- function(input, output, session) { Project.ID <- c("Test Project 1", "Test Project 1", "Test Project 1", "Test Project 1") Project.ID2 <- c("Test Project 2", "Test Project 2", "Test Project 2", "Test Project 2") Author.ID <- c("1234", "5234", "3253", "5325") Fav.Color <- c("Blue", "Red", "Blue", "Green") Author.Name <- c("Bob", "Jenny", "Bob", "Alice") output$projectSelection <- renderUI( tagList( selectInput("projectSelection", "Project Name:", c("Project1", "Project2"), selectize=TRUE), actionButton('addCol', strong("Add UI"), icon=icon("plus", class=NULL, lib="font-awesome")) ) ) # update datatable project <- reactive({ if(input$projectSelection == "Project1"){ projectDT <- data.frame(Project.ID, Author.ID, Author.Name) } if(input$projectSelection == "Project2"){ projectDT <- data.frame(Project.ID2, Author.Name, Fav.Color) } return(projectDT) }) observeEvent(input$addCol,{ output$addSelect <- renderUI({ selectInput("abc","Column Names", choices = c(unique(as.vector(colnames(project()))))) }) output$checkbox <- renderUI({ checkboxGroupInput("cde", "Column Value", choices = project() [,input$abc] ) }) }) } shinyApp(ui=ui, server = server) 方法无法正常工作?

0 个答案:

没有答案