January 30, 200916 yr hello (sorry, I'm french and don't speak English very well) I test scriptmaster, and I want to copy one file in other directory from my filemaker server/IWP I write this code java.io.FileInputStream sourceFile=null; java.io.FileOutputStream destinationFile=null; new File(destination).createNewFile(); sourceFile = new java.io.FileInputStream(source); destinationFile = new java.io.FileOutputStream(destination); byte buffer[]=new byte[512*1024]; int nbLecture; while( (nbLecture = sourceFile.read(buffer)) != -1 ) { destinationFile.write(buffer, 0, nbLecture); } but scriptmaster return an error about the type "BYTE": org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, Script1.groovy: 11: Primitive type literal: byte cannot be used as a method name at line: 11 column: 1. File: Script1.groovy @ line 11, column 1. anyone had any idea about this problem ? thanks a lot !
January 31, 200916 yr Je ne connais pas trop le java mais à ce que je peux comprendre, vous avez utilisé un mot réservé - "byte" pour nommer la commande envoyé. Je ne vous garantis rien, mais essayez de changer la ligne: byte buffer[]=new byte[512*1024]; en (par exemple) ByteBuffer buffer[]=new byte[512*1024];
January 31, 200916 yr Author Je ne connais pas trop le java mais à ce que je peux comprendre, vous avez utilisé un mot réservé - "byte" pour nommer la commande envoyé. Je ne vous garantis rien, mais essayez de changer la ligne: byte buffer[]=new byte[512*1024]; en (par exemple) ByteBuffer buffer[]=new byte[512*1024]; Finalement il s'agissait de la définition du tableau, elle se faisait sur le "byte" directement byte[] buffer=new byte[512*1024]; merci
Create an account or sign in to comment