Go Back   Java Programming Forums > Java Standard Edition Programming Help > What's Wrong With My Code?


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-03-2010, 08:10 AM
Junior Member
 

Join Date: Mar 2010
Posts: 1
Thanks: 1
Thanked 0 Times in 0 Posts
chuikingman is on a distinguished road
Default what is wrong for the java code

aaaaaaaaaa




Last edited by chuikingman; 06-04-2010 at 10:47 AM. Reason: invalid data
Reply With Quote Share this thread on Facebook
Sponsored Links
Java Training from DevelopIntelligence
  #2 (permalink)  
Old 11-03-2010, 06:00 AM
helloworld922's Avatar
Super Moderator
 

Join Date: Jun 2009
Posts: 1,215
Thanks: 5
Thanked 258 Times in 234 Posts
helloworld922 will become famous soon enoughhelloworld922 will become famous soon enoughhelloworld922 will become famous soon enough
Default Re: what is wrong for the java code

You're trying to code outside of any method. Java won't allow you to do this. I would put this code inside the main method (the method that gets called when you run your program directly)

Java Code
public class test
{
     public static void main(String[] args)
     {
          LogonManagerServiceLocator locator = new LogonManagerServiceLocator();
          LogonManager logonMgr = locator.getLogonManager();
          String sessionId = logonMgr.logon("admgemalto", "gemalto40");
          String[] categoryNames = new String[] {"AppletManagement", "ServiceManagement",
               "NoCategory"};
          CategoryBean[] cates = logonMgr.getAccessRights(sessionId, categoryNames);
          for ( int i=0; i< cates.length; i++ )
          {
               System.out.println(cates[i].getName, cates[i].isGranted());
          }
          boolean success = logonMgr.logout(sessionId);
     }
}
__________________
ASCII a question .. Get an ANSI

Please surround your code with [highlight=Java]code goes here[/highlight].
Reply With Quote
The Following User Says Thank You to helloworld922 For This Useful Post:
chuikingman (06-04-2010)
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Similar Threads
Thread Thread Starter Forum Replies Last Post
Whats wrong with my code? mlan What's Wrong With My Code? 0 15-02-2010 07:49 PM
What can go wrong if you replace && with & in the following code: scott01 Java Theory & Questions 4 12-02-2010 11:47 AM
I can't find out what is wrong with my code. Please Help! hallor618 What's Wrong With My Code? 3 10-02-2010 06:44 PM
i'm new to java. whats is wrong in this code? igorek83 What's Wrong With My Code? 1 31-12-2009 12:38 AM
Can someone help me figure where I went wrong in the below code tina.goyal What's Wrong With My Code? 3 26-05-2009 01:49 PM


100 most searched terms
Search Cloud
2 dimensional arraylist java 2d arraylist java actionlistener actionlistener in java addactionlistener addactionlistener java convert double to integer java double format java double to integer in java double to integer java drag en drop programmeren java eclipse shortcut keys exception in thread "awt-eventqueue-0" java.lang.outofmemoryerror: java heap space exception in thread "main" java.lang.nullpointerexception exception in thread "main" java.lang.outofmemoryerror: java heap space format double in java format double java get mouse position java java 2d arraylist java actionlistener java double format java double formatting java double to int java double to integer java format double java forum java forums java get mouse position java list to map java mouse position java programming forum java programming forums java programming practice problems java send keystrokes to another application java two dimensional arraylist java.io.ioexception: premature eof java.lang.classformaterror: truncated class file java.lang.outofmemoryerror: java heap space java.util.arraylist jbutton action jbutton actionlistener jtextarea font jtextfield font size jxl.read.biff.biffexception: unable to recognize ole stream programming mutators and generics smack api two dimensional arraylist two dimensional arraylist java unable to sendviapost to url what is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20?

All times are GMT. The time now is 02:03 AM.
Powered by vBulletin® Copyright ©2000-2009, Jelsoft Enterprises Ltd.