Problem converting a (working) Java program into an applet

When I'm trying to access an Image through a call to :
mediaTracker = new MediaTracker(this);
backGroundImage = getImage(getDocumentBase(), "background.gif");
mediaTracker.addImage(backGroundImage, 0);
I'm getting a nullPointerException as a result of the call to getDocumentBase() :
C:\Chantier\Java\BallsApplet
AppletViewer testBallsApplet.htmljava.lang.NullPointerException
at java.applet.Applet.getDocumentBase(Applet.java:125)
at Balls.<init>(Balls.java:84)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:296)
at java.lang.Class.newInstance(Class.java:249)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:548)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:477)
at sun.applet.AppletPanel.run(AppletPanel.java:290)
at java.lang.Thread.run(Thread.java:536)
It seems very weird to me... :-/
(all the .gif files are in the same directory than the .class files)
The problem appears with AppletViewer trying to open an HTML file
containing :
<HTML>
<APPLET CODE="Balls.class" WIDTH=300 HEIGHT=211>
</APPLET>
</HTML>
(I tried unsuccessfully the CODEBASE and ARCHIVE attributes, with and without putting the .gif and .class into a .jar file)
I can't find the solution by myself, so, I'd be very glad if someone could help
me with this... Thank you very much in advance ! :-)
You'll find below the source of a small game that I wrote and debugged (without
problem) and that I'm now (unsuccessfully) trying to convert into an Applet :
import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.net.URL;
public class Balls extends java.applet.Applet implements Runnable, KeyListener
private Image offScreenImage;
private Image backGroundImage;
private Image[] gifImages = new Image[6];
private Image PressStart ;
private Sprite pressStartSprite = null ;
private Image YouLose ;
private Sprite YouLoseSprite = null ;
private Image NextStage ;
private Sprite NextStageSprite = null ;
private Image GamePaused ;
private Sprite GamePausedSprite = null ;
//offscreen graphics context
private Graphics offScreenGraphicsCtx;
private Thread animationThread;
private MediaTracker mediaTracker;
private SpriteManager spriteManager;
//Animation display rate, 12fps
private int animationDelay = 83;
private Random rand = new Random(System.currentTimeMillis());
private int message = 0 ; // 0 = no message (normal playing phase)
// 1 = press space to start
// 2 = press space for next level
// 3 = game PAUSED, press space to unpause
// 4 = You LOSE
public static void main(String[] args)
try
new Balls() ;
catch (java.net.MalformedURLException e)
System.out.println(e);
}//end main
public void start()
//Create and start animation thread
animationThread = new Thread(this);
animationThread.start();
public void init()
try
new Balls() ;
catch (java.net.MalformedURLException e)
System.out.println(e);
public Balls() throws java.net.MalformedURLException
{//constructor
// Load and track the images
mediaTracker = new MediaTracker(this);
backGroundImage = getImage(getDocumentBase(), "background.gif");
mediaTracker.addImage(backGroundImage, 0);
PressStart = getImage(getDocumentBase(), "press_start.gif");
mediaTracker.addImage(PressStart, 0);
NextStage = getImage(getDocumentBase(), "stage_complete.gif");
mediaTracker.addImage(NextStage, 0);
GamePaused = getImage(getDocumentBase(), "game_paused.gif");
mediaTracker.addImage(GamePaused, 0);
YouLose = getImage(getDocumentBase(), "you_lose.gif");
mediaTracker.addImage(YouLose, 0);
//Get and track 6 images to use
// for sprites
gifImages[0] = getImage(getDocumentBase(), "blueball.gif");
mediaTracker.addImage(gifImages[0], 0);
gifImages[1] = getImage(getDocumentBase(), "redball.gif");
mediaTracker.addImage(gifImages[1], 0);
gifImages[2] = getImage(getDocumentBase(), "greenball.gif");
mediaTracker.addImage(gifImages[2], 0);
gifImages[3] = getImage(getDocumentBase(), "yellowball.gif");
mediaTracker.addImage(gifImages[3], 0);
gifImages[4] = getImage(getDocumentBase(), "purpleball.gif");
mediaTracker.addImage(gifImages[4], 0);
gifImages[5] = getImage(getDocumentBase(), "orangeball.gif");
mediaTracker.addImage(gifImages[5], 0);
//Block and wait for all images to
// be loaded
try {
mediaTracker.waitForID(0);
}catch (InterruptedException e) {
System.out.println(e);
}//end catch
//Base the Frame size on the size
// of the background image.
//These getter methods return -1 if
// the size is not yet known.
//Insets will be used later to
// limit the graphics area to the
// client area of the Frame.
int width = backGroundImage.getWidth(this);
int height = backGroundImage.getHeight(this);
//While not likely, it may be
// possible that the size isn't
// known yet. Do the following
// just in case.
//Wait until size is known
while(width == -1 || height == -1)
System.out.println("Waiting for image");
width = backGroundImage.getWidth(this);
height = backGroundImage.getHeight(this);
}//end while loop
//Display the frame
setSize(width,height);
setVisible(true);
//setTitle("Balls");
//Anonymous inner class window
// listener to terminate the
// program.
this.addWindowListener
(new WindowAdapter()
{public void windowClosing(WindowEvent e){System.exit(0);}});
// Add a key listener for keyboard management
this.addKeyListener(this);
}//end constructor
public void run()
Point center_place = new Point(
backGroundImage.getWidth(this)/2-PressStart.getWidth(this)/2,
backGroundImage.getHeight(this)/2-PressStart.getHeight(this)/2) ;
pressStartSprite = new Sprite(this, PressStart, center_place, new Point(0, 0),true);
center_place = new Point(
backGroundImage.getWidth(this)/2-NextStage.getWidth(this)/2,
backGroundImage.getHeight(this)/2-NextStage.getHeight(this)/2) ;
NextStageSprite = new Sprite(this, NextStage, center_place, new Point(0, 0),true);
center_place = new Point(
backGroundImage.getWidth(this)/2-GamePaused.getWidth(this)/2,
backGroundImage.getHeight(this)/2-GamePaused.getHeight(this)/2) ;
GamePausedSprite = new Sprite(this, GamePaused, center_place, new Point(0, 0),true);
center_place = new Point(
backGroundImage.getWidth(this)/2-YouLose.getWidth(this)/2,
backGroundImage.getHeight(this)/2-YouLose.getHeight(this)/2) ;
YouLoseSprite = new Sprite(this, YouLose, center_place, new Point(0, 0),true);
BackgroundImage bgimage = new BackgroundImage(this, backGroundImage) ;
for (;;) // infinite loop
long time = System.currentTimeMillis();
message = 1 ; // "press start to begin"
while (message != 0)
repaint() ;
try
time += animationDelay;
Thread.sleep(Math.max(0,time - System.currentTimeMillis()));
catch (InterruptedException e)
System.out.println(e);
}//end catch
boolean you_lose = false ;
for (int max_speed = 7 ; !you_lose && max_speed < 15 ; max_speed++)
for (int difficulty = 2 ; !you_lose && difficulty < 14 ; difficulty++)
boolean unfinished_stage = true ;
spriteManager = new SpriteManager(bgimage);
spriteManager.setParameters(difficulty, max_speed) ;
//Create 15 sprites from 6 gif
// files.
for (int cnt = 0; cnt < 15; cnt++)
if (cnt == 0)
Point position = new Point(
backGroundImage.getWidth(this)/2-gifImages[0].getWidth(this)/2,
backGroundImage.getHeight(this)/2-gifImages[0].getHeight(this)/2) ;
spriteManager.addSprite(makeSprite(position, 0, false));
else
Point position = spriteManager.
getEmptyPosition(new Dimension(gifImages[0].getWidth(this),
gifImages[0].getHeight(this)));
if (cnt < difficulty)
spriteManager.addSprite(makeSprite(position, 1, true));
else
spriteManager.addSprite(makeSprite(position, 2, true));
}//end for loop
time = System.currentTimeMillis();
while (!spriteManager.getFinishedStage() && !spriteManager.getGameOver())
// Loop, sleep, and update sprite
// positions once each 83
// milliseconds
spriteManager.update();
repaint();
try
time += animationDelay;
Thread.sleep(Math.max(0,time - System.currentTimeMillis()));
catch (InterruptedException e)
System.out.println(e);
}//end catch
}//end while loop
if (spriteManager.getGameOver())
message = 4 ;
while (message != 0)
spriteManager.update();
repaint();
try
time += animationDelay;
Thread.sleep(Math.max(0,time - System.currentTimeMillis()));
catch (InterruptedException e)
System.out.println(e);
}//end catch
you_lose = true ;
if (spriteManager.getFinishedStage())
message = 2 ;
while (message != 0)
spriteManager.update();
repaint();
try
time += animationDelay;
Thread.sleep(Math.max(0,time - System.currentTimeMillis()));
catch (InterruptedException e)
System.out.println(e);
}//end catch
} // end for difficulty loop
} // end for max_speed
} // end infinite loop
}//end run method
private Sprite makeSprite(Point position, int imageIndex, boolean wind)
return new Sprite(
this,
gifImages[imageIndex],
position,
new Point(rand.nextInt() % 5,
rand.nextInt() % 5),
wind);
}//end makeSprite()
//Overridden graphics update method
// on the Frame
public void update(Graphics g)
//Create the offscreen graphics
// context
if (offScreenGraphicsCtx == null)
offScreenImage = createImage(getSize().width,
getSize().height);
offScreenGraphicsCtx = offScreenImage.getGraphics();
}//end if
if (message == 0)
// Draw the sprites offscreen
spriteManager.drawScene(offScreenGraphicsCtx);
else if (message == 1)
pressStartSprite.drawSpriteImage(offScreenGraphicsCtx);
else if (message == 2)
NextStageSprite.drawSpriteImage(offScreenGraphicsCtx);
else if (message == 3)
GamePausedSprite.drawSpriteImage(offScreenGraphicsCtx);
else if (message == 4)
YouLoseSprite.drawSpriteImage(offScreenGraphicsCtx);
// Draw the scene onto the screen
if(offScreenImage != null)
g.drawImage(offScreenImage, 0, 0, this);
}//end if
}//end overridden update method
//Overridden paint method on the
// Frame
public void paint(Graphics g)
//Nothing required here. All
// drawing is done in the update
// method above.
}//end overridden paint method
// Methods to handle Keyboard event
public void keyPressed(KeyEvent evt)
int key = evt.getKeyCode(); // Keyboard code for the pressed key.
if (key == KeyEvent.VK_SPACE)
if (message != 0)
message = 0 ;
else
message = 3 ;
if (key == KeyEvent.VK_LEFT)
if (spriteManager != null)
spriteManager.goLeft() ;
else if (key == KeyEvent.VK_RIGHT)
if (spriteManager != null)
spriteManager.goRight() ;
else if (key == KeyEvent.VK_UP)
if (spriteManager != null)
spriteManager.goUp() ;
else if (key == KeyEvent.VK_DOWN)
if (spriteManager != null)
spriteManager.goDown() ;
if (spriteManager != null)
spriteManager.setMessage(message) ;
public void keyReleased(KeyEvent evt)
public void keyTyped(KeyEvent e)
char key = e.getKeyChar() ;
//~ if (key == 's')
//~ stop = true ;
//~ else if (key == 'c')
//~ stop = false ;
//~ spriteManager.setStop(stop) ;
}//end class Balls
//===================================//
class BackgroundImage
private Image image;
private Component component;
private Dimension size;
public BackgroundImage(
Component component,
Image image)
this.component = component;
size = component.getSize();
this.image = image;
}//end construtor
public Dimension getSize(){
return size;
}//end getSize()
public Image getImage(){
return image;
}//end getImage()
public void setImage(Image image){
this.image = image;
}//end setImage()
public void drawBackgroundImage(Graphics g)
g.drawImage(image, 0, 0, component);
}//end drawBackgroundImage()
}//end class BackgroundImage
//===========================
class SpriteManager extends Vector
private BackgroundImage backgroundImage;
private boolean finished_stage = false ;
private boolean game_over = false ;
private int difficulty ;
private int max_speed ;
public boolean getFinishedStage()
finished_stage = true ;
for (int cnt = difficulty ; cnt < size(); cnt++)
Sprite sprite = (Sprite)elementAt(cnt);
if (!sprite.getEaten())
finished_stage = false ;
return finished_stage ;
public boolean getGameOver() {return game_over ;}
public void setParameters(int diff, int speed)
difficulty = diff ;
max_speed = speed ;
finished_stage = false ;
game_over = false ;
Sprite sprite;
for (int cnt = 0;cnt < size(); cnt++)
sprite = (Sprite)elementAt(cnt);
sprite.setSpeed(max_speed) ;
public SpriteManager(BackgroundImage backgroundImage)
this.backgroundImage = backgroundImage ;
}//end constructor
public Point getEmptyPosition(Dimension spriteSize)
Rectangle trialSpaceOccupied = new Rectangle(0, 0,
spriteSize.width,
spriteSize.height);
Random rand = new Random(System.currentTimeMillis());
boolean empty = false;
int numTries = 0;
// Search for an empty position
while (!empty && numTries++ < 100)
// Get a trial position
trialSpaceOccupied.x =
Math.abs(rand.nextInt() %
backgroundImage.
getSize().width);
trialSpaceOccupied.y =
Math.abs(rand.nextInt() %
backgroundImage.
getSize().height);
// Iterate through existing
// sprites, checking if position
// is empty
boolean collision = false;
for(int cnt = 0;cnt < size(); cnt++)
Rectangle testSpaceOccupied = ((Sprite)elementAt(cnt)).getSpaceOccupied();
if (trialSpaceOccupied.intersects(testSpaceOccupied))
collision = true;
}//end if
}//end for loop
empty = !collision;
}//end while loop
return new Point(trialSpaceOccupied.x, trialSpaceOccupied.y);
}//end getEmptyPosition()
public void update()
Sprite sprite;
// treat special case of sprite #0 (the player)
sprite = (Sprite)elementAt(0);
sprite.updatePosition() ;
int hitIndex = testForCollision(sprite);
if (hitIndex != -1)
if (hitIndex < difficulty)
{ // if player collides with an hunter (red ball), he loose
sprite.setEaten() ;
game_over = true ;
else
// if player collides with an hunted (green ball), he eats the green
((Sprite)elementAt(hitIndex)).setEaten() ;
//Iterate through sprite list
for (int cnt = 1;cnt < size(); cnt++)
sprite = (Sprite)elementAt(cnt);
//Update a sprite's position
sprite.updatePosition();
//Test for collision. Positive
// result indicates a collision
hitIndex = testForCollision(sprite);
if (hitIndex >= 0)
//a collision has occurred
bounceOffSprite(cnt,hitIndex);
}//end if
}//end for loop
}//end update
public void setMessage(int message)
Sprite sprite;
//Iterate through sprite list
for (int cnt = 0;cnt < size(); cnt++)
sprite = (Sprite)elementAt(cnt);
//Update a sprite's stop status
sprite.setMessage(message);
}//end for loop
}//end update
public void goLeft()
Sprite sprite = (Sprite)elementAt(0);
sprite.goLeft() ;
public void goRight()
Sprite sprite = (Sprite)elementAt(0);
sprite.goRight() ;
public void goUp()
Sprite sprite = (Sprite)elementAt(0);
sprite.goUp() ;
public void goDown()
Sprite sprite = (Sprite)elementAt(0);
sprite.goDown() ;
private int testForCollision(Sprite testSprite)
//Check for collision with other
// sprites
Sprite sprite;
for (int cnt = 0;cnt < size(); cnt++)
sprite = (Sprite)elementAt(cnt);
if (sprite == testSprite)
//don't check self
continue;
//Invoke testCollision method
// of Sprite class to perform
// the actual test.
if (testSprite.testCollision(sprite))
//Return index of colliding
// sprite
return cnt;
}//end for loop
return -1;//No collision detected
}//end testForCollision()
private void bounceOffSprite(int oneHitIndex, int otherHitIndex)
//Swap motion vectors for
// bounce algorithm
Sprite oneSprite = (Sprite)elementAt(oneHitIndex);
Sprite otherSprite = (Sprite)elementAt(otherHitIndex);
Point swap = oneSprite.getMotionVector();
oneSprite.setMotionVector(otherSprite.getMotionVector());
otherSprite.setMotionVector(swap);
}//end bounceOffSprite()
public void drawScene(Graphics g)
//Draw the background and erase
// sprites from graphics area
//Disable the following statement
// for an interesting effect.
backgroundImage.drawBackgroundImage(g);
//Iterate through sprites, drawing
// each sprite
for (int cnt = 0;cnt < size(); cnt++)
((Sprite)elementAt(cnt)).drawSpriteImage(g);
}//end drawScene()
public void addSprite(Sprite sprite)
addElement(sprite);
}//end addSprite()
}//end class SpriteManager
//===================================//
class Sprite
private Component component;
private Image image;
private Rectangle spaceOccupied;
private Point motionVector;
private Rectangle bounds;
private Random rand;
private int message = 0 ; // number of message currently displayed (0 means "no message" = normal game)
private int max_speed = 7 ;
private boolean eaten = false ; // when a green sprite is eaten, it is no longer displayed on screen
private boolean wind = true ;
private boolean go_left = false ;
private boolean go_right = false ;
private boolean go_up = false ;
private boolean go_down = false ;
public Sprite(Component component,
Image image,
Point position,
Point motionVector,
boolean Wind
//Seed a random number generator
// for this sprite with the sprite
// position.
rand = new Random(position.x);
this.component = component;
this.image = image;
setSpaceOccupied(new Rectangle(
position.x,
position.y,
image.getWidth(component),
image.getHeight(component)));
this.motionVector = motionVector;
this.wind = Wind ;
//Compute edges of usable graphics
// area in the Frame.
int topBanner = ((Container)component).getInsets().top;
int bottomBorder = ((Container)component).getInsets().bottom;
int leftBorder = ((Container)component).getInsets().left;
int rightBorder = ((Container)component).getInsets().right;
bounds = new Rectangle( 0 + leftBorder, 0 + topBanner
, component.getSize().width - (leftBorder + rightBorder)
, component.getSize().height - (topBanner + bottomBorder));
}//end constructor
public void setMessage(int message_number)
message = message_number ;
public void setSpeed(int speed)
max_speed = speed ;
public void goLeft()
go_left = true ;
public void goRight()
go_right = true ;
public void goUp()
go_up = true ;
public void goDown()
go_down = true ;
public void setEaten()
eaten = true ;
setSpaceOccupied(new Rectangle(4000,4000,0,0)) ;
public boolean getEaten()
return eaten ;
public Rectangle getSpaceOccupied()
return spaceOccupied;
}//end getSpaceOccupied()
void setSpaceOccupied(Rectangle spaceOccupied)
this.spaceOccupied = spaceOccupied;
}//setSpaceOccupied()
public void setSpaceOccupied(
Point position){
spaceOccupied.setLocation(
position.x, position.y);
}//setSpaceOccupied()
public Point getMotionVector(){
return motionVector;
}//end getMotionVector()
public void setMotionVector(
Point motionVector){
this.motionVector = motionVector;
}//end setMotionVector()
public void setBounds(Rectangle bounds)
this.bounds = bounds;
}//end setBounds()
public void updatePosition()
Point position = new Point(spaceOccupied.x, spaceOccupied.y);
if (message != 0)
return ;
//Insert random behavior. During
// each update, a sprite has about
// one chance in 10 of making a
// random change to its
// motionVector. When a change
// occurs, the motionVector
// coordinate values are forced to
// fall between -7 and 7. This
// puts a cap on the maximum speed
// for a sprite.
if (!wind)
if (go_left)
motionVector.x -= 2 ;
if (motionVector.x < -15)
motionVector.x = -14 ;
go_left = false ;
if (go_right)
motionVector.x += 2 ;
if (motionVector.x > 15)
motionVector.x = 14 ;
go_right = false ;
if (go_up)
motionVector.y -= 2 ;
if (motionVector.y < -15)
motionVector.y = -14 ;
go_up = false ;
if (go_down)
motionVector.y += 2 ;
if (motionVector.y > 15)
motionVector.y = 14 ;
go_down = false ;
else if(rand.nextInt() % 7 == 0)
Point randomOffset =
new Point(rand.nextInt() % 3,
rand.nextInt() % 3);
motionVector.x += randomOffset.x;
if(motionVector.x >= max_speed)
motionVector.x -= max_speed;
if(motionVector.x <= -max_speed)
motionVector.x += max_speed ;
motionVector.y += randomOffset.y;
if(motionVector.y >= max_speed)
motionVector.y -= max_speed;
if(motionVector.y <= -max_speed)
motionVector.y += max_speed;
}//end if
//Move the sprite on the screen
position.translate(motionVector.x, motionVector.y);
//Bounce off the walls
boolean bounceRequired = false;
Point tempMotionVector = new Point(
motionVector.x,
motionVector.y);
//Handle walls in x-dimension
if (position.x < bounds.x)
bounceRequired = true;
position.x = bounds.x;
//reverse direction in x
tempMotionVector.x = -tempMotionVector.x;
else if ((position.x + spaceOccupied.width) > (bounds.x + bounds.width))
bounceRequired = true;
position.x = bounds.x +
bounds.width -
spaceOccupied.width;
//reverse direction in x
tempMotionVector.x =
-tempMotionVector.x;
}//end else if
//Handle walls in y-dimension
if (position.y < bounds.y)
bounceRequired = true;
position.y = bounds.y;
tempMotionVector.y = -tempMotionVector.y;
else if ((position.y + spaceOccupied.height)
> (bounds.y + bounds.height))
bounceRequired = true;
position.y = bounds.y +
bounds.height -
spaceOccupied.height;
tempMotionVector.y =
-tempMotionVector.y;
}//end else if
if(bounceRequired)
//save new motionVector
setMotionVector(
tempMotionVector);
//update spaceOccupied
setSpaceOccupied(position);
}//end updatePosition()
public void drawSpriteImage(Graphics g)
if (!eaten)
g.drawImage(image,
spaceOccupied.x,
spaceOccupied.y,
component);
}//end drawSpriteImage()
public boolean testCollision(Sprite testSprite)
//Check for collision with
// another sprite
if (testSprite != this)
return spaceOccupied.intersects(
testSprite.getSpaceOccupied());
}//end if
return false;
}//end testCollision
}//end Sprite class
//===================================//
Thanks for your help...

Sorry,
Can you tell me how do you solve it because I have got the same problem.
Can you indicate me the topic where did you find solution.
Thank in advance.

Similar Messages

  • JavaService - can install java program into win2k service, but cannot run

    i have a JavaService problem: i can install java program into win2k service, but cannot run
    the version of javaservice is 2.0.7.0
    the following is the message:
    C:\DailyUpdate\dist>JavaService.exe -install DailyUpdate C:\Program Files\Java\j
    dk1.5.0_05\jre\bin\client\jvm.dll -Djava.class.path=C:\DailyUpdate\dist\ftpbean.
    jar;C:\DailyUpdate\dist\mysql-connector-java-3.0.10-stable-bin.jar;C:\DailyUpdat
    e\dist\DailyUpdater.jar -Xms16M -Xmx64M -start DailyUpdateHandler -params C:\Dai
    lyUpdate\dist -out C:\DailyUpdate\dist\logs\out.log -err C:\DailyUpdate\dist\lo
    gs\err.log
    The DailyUpdate automatic service was successfully installed
    The DailyUpdate service is starting.
    The DailyUpdate service could not be started.
    The service did not report an error.
    More help is available by typing NET HELPMSG 3534.

    I might be doing some programming for my company soon
    which will require a program to monitor a database
    and whenever there is a change to certain fields, it
    must copy certain fields into another database. When I see "whenever thiere is a change to certain fields" I tend to think "triggers" - but maybe this won't work for you 'cause of the "another database" part. And the fact that triggers are inherently evil.
    [snip]
    Is it possible to run a Java program as a windows
    service? And if so then how would you go about it? I'd hit Google - there're a couple ways to do this.
    [snip]
    Also,...if I were to use one of those programs which
    can make an .exe of a Java program, then do you still
    require the JRE to be on the machine? It depends on how you did the conversion. If you compile to native then no, if you just wrap up a JRE then yes.
    Why I ask is
    that I occasionally get asked to do small development
    projects for my company, but we are a microsoft
    partner and therefore do all the development in C#
    and the like. So I would like to just implement as
    many things in Java as I can, just to show everyone
    that Java can do exactly what C# can do. But its
    difficult to convince people of this since I always
    require the JRE and they dont. Of course, they require the .NET framework and you don't. And last I looked that thing was around 23 Meg.

  • How to convert a Java Program into a Service?

    Hello Experts,
    We want to convert a java program into a Service (not WebService).
    then we want to consume this service through SAP PI.
    Can any1 please give details as to how can we convert a java program into a service.
    Thanks in advance,
    ~ Suraj

    Hi Suraj,
    Unfortunately this information is still not enough. Probably I cannot understand right what you are trying to do.
    To work with tables and databases SAP uses several specifications, for example JPA API, Java Dictionary and so on. But I am not sure if this is what you need.
    Best regards,
    Ekaterina

  • I am having a problem converting a scanned pdf file into Excel.

    I am having a problem converting a scanned pdf file into Excel. I do not get the columns and rows to align, just a single column of everything. Any suggestions?

    Export makes use of what is "in" a PDF.
    Good export is the "silk purse" and, ya know, you canna make a silk purse from a sow's ear (which is what any scanned image in PDF is with regards to export).
    The quality of export is dictated by the quality of the PDF. We are taking about the "inner essences" of the PDF (e.g., degree of compliance with the PDF Standard - ISO 32000-1).
    So, what goes in goes out or "GIGO".
    This has nothing to do with Acrobat or Acrobat's export process.
    A well-formed Tagged PDF (compliant to ISO 32000-1 & ISO 14289-1, PDF/UA-1) provides a PDF that proactively
    supports content export by Acrobat.
    To get the good stuff from export you start with a well-formed Tagged PDF.
    Goodstuff In — Goodstuff Out
    or
    Garbage In — Garbage Out
    "GIGO"
    Be well...
    Message was edited by: CtDave

  • Problem when Running a java program

    I am new to Java. I have installed JDK 1.3.1 on my machine. have setup the class path also. My program complies fine but when i am running it I am getting the following error.
    Exception in thread "main" java.lang.NoClassDefFoundError: InsertSuppliers
    Press any key to continue . . .
    I am pasting my java program underneath. Can anybody please help me?
    import java.sql.*;
    import java.lang.*;
    import java.util.*;
    import java.io.*;
    public class InsertSuppliers
         public static void main(String[] args)
    throws IOException
              System.out.println("iuysuiysuidyfsduyf");
              String url = "jdbc:odbc:CafeJava";
              Connection con;
              Statement stmt;
              String query = "select SUP_NAME, SUP_ID from SUPPLIERS";
              try {
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              } catch(java.lang.ClassNotFoundException e) {
                   System.err.print("ClassNotFoundException: ");
                   System.err.println(e.getMessage());
              try {
                   con = DriverManager.getConnection(url,
                                                 "Admin", "duke1");
                   stmt = con.createStatement();
                   stmt.executeUpdate("insert into SUPPLIERS " +
         "values(49, 'Superior Coffee', '1 Party Place', " +
                        "'Mendocino', 'CA', '95460')");
                   stmt.executeUpdate("insert into SUPPLIERS " +
                        "values(101, 'Acme, Inc.', '99 Market Street', " +
                        "'Groundsville', 'CA', '95199')");
                   stmt.executeUpdate("insert into SUPPLIERS " +
         "values(150, 'The High Ground', '100 Coffee Lane', " +
                        "'Meadows', 'CA', '93966')");
                   ResultSet rs = stmt.executeQuery(query);
                   System.out.println("Suppliers and their ID Numbers:");
                   while (rs.next()) {
                        String s = rs.getString("SUP_NAME");
                        int n = rs.getInt("SUP_ID");
                        System.out.println(s + " " + n);
                   stmt.close();
                   con.close();
              } catch(SQLException ex) {
                   System.err.println("SQLException: " + ex.getMessage());
    }

    Your error occurs because java can not find a file named InsertSuppliers.class in the Classpath. there are 3 basic ways to make this work. Assume you compiled InsertSuppliers so that the InsertSuppliers.class file is in a directory c:\myjava (I am assuming Windows).
    1. Do not set your System Classpath. CD to the c:\myjava directory. Enter "java InsertSuppliers"
    2. Set your System Classpath = .;c:\myjava and enter "java InsertSuppliers" from any directory.
    3. Enter "java -classpath c:\myjava InsertSuppliers" from any directory.
    Of course, none of these will work if InsertSuppliers.class file doesn't exist in c:\myjava. And remember that class names are case sensitive.

  • Method to get working Java program on a PDA

    Hello all,
    I am attempting to create a java program for my PDA. I'm trying to use CrEme to do it but I am having many many problems with it. I've looked on the forums and they all appear to be posts where people have some clue. I have none.
    For example. Can you use any sdk to develop the program. Can you simply develop a desktop app and convert it to use on a PDA?
    Once CrEme is downloaded what do you have to add to the classpath on your desktop to compile with it. Up till now I've simply compiled with the standard java system using %javac my_app.java
    What do you type in the command line to run the emulator?
    In what form should you port the program to your pda? I've tried using .jar files. I load it and nothing happens. What do I have to type in the jRun command? Whats a .lk file and how do I use it?
    So many questions so little time. I am genuinly confused by all this and some help would be appreciated. I have looked around the internet and can find little or nothing to help a pda newbie . Incidently if I have missed anything online and this is all just wasting someones time, could they show me where I've missed it?
    Thanks a lot
    N

    I built a lot of applications to run on my PDA (Sharp Zaurus SL5500). When I first got the PDA I didn't know any Java. What I do, and it may not be useful to you, is to develop on my desktop using as few classes not supported in 1.0 as I can get away with. That seems to make the code runnable on the Zaurus JVM (which is JEODE). I don't use an interactive development environment (I never have gotten the hang of them); I just use a text editor that supports syntax highlighting (CONTEXT). Then I copy the compiled classes to the PDA and run them there.

  • Possible? output a string from a java program into a running program

    I'm not sure if it is plausible, but this is my dilemma. My java program searches for street names in a specific region, then outputs the nearest street. I would like to synch this up with Google Earth, and output the street name into it, so it would go ahead and be able to search it right away. Is this possible, or should I attempt some other route?

    Check out my runCmd method. It gives an example of running another program and listening for the output. I built this to run javac and show the output in my custom editor.
    You'll see some classes in here that are not standard java classes, in particular InfoFetcher. Don't worry, this is just a utility I wrote for convenient handling of inputstreams. You can handle the inputstreams without it, but if you really want it, it's probably posted somewhere in these forums.
            private void runCmd(String cmd) {
                 try {
                      System.out.println("cmd: " + cmd);
                      Process p = Runtime.getRuntime().exec(cmd);
                      InputStream stream = p.getInputStream();
                      InputStream stream2 = p.getErrorStream();
                      InfoFetcher info = new InfoFetcher(stream, new byte[512], 500);
                      InputStreamListener l = new InputStreamListener() {
                           int currentLength = 0;
                           public void gotAll(InputStreamEvent ev) {}
                           public void gotMore(InputStreamEvent ev) {
                                String str = new String(ev.buffer, currentLength, ev.getBytesRetrieved());
                                currentLength = ev.getBytesRetrieved();
                                System.out.print(str);
                      info.addInputStreamListener(l);
                      Thread t = new Thread(info);
                      t.start();
                        InfoFetcher info2 = new InfoFetcher(stream2, new byte[512], 500);
                      InputStreamListener l2 = new InputStreamListener() {
                           int currentLength = 0;
                           public void gotAll(InputStreamEvent ev) {}
                           public void gotMore(InputStreamEvent ev) {
                                String str = new String(ev.buffer, currentLength, ev.getBytesRetrieved());
                                currentLength = ev.getBytesRetrieved();
                                System.out.print("(Error) " + str);
                      info2.addInputStreamListener(l2);
                      Thread t2 = new Thread(info2);
                      t2.start();
                 catch (IOException iox) {
                      iox.printStackTrace();
            }

  • Problem while executing simple java program

    Hi
    while trying to execute a simple java program,i am getting the following exception...
    please help me in this
    java program :import java.util.*;
    import java.util.logging.*;
    public class Jump implements Runnable{
        Hashtable activeQueues = new Hashtable();
        String dbURL, dbuser, dbpasswd, loggerDir;   
        int idleSleep;
        static Logger logger = Logger.getAnonymousLogger();      
        Thread myThread = null;
        JumpQueueManager manager = null;
        private final static String VERSION = "2.92";
          public Jump(String jdbcURL, String user, String pwd, int idleSleep, String logDir) {
            dbURL = jdbcURL;
            dbuser = user;
            dbpasswd = pwd;
            this.idleSleep = idleSleep;
            manager = new JumpQueueManager(dbURL, dbuser, dbpasswd);
            loggerDir = logDir;
            //preparing logger
            prepareLogger();
          private void prepareLogger(){      
            Handler hndl = new pl.com.sony.utils.SimpleLoggerHandler();
            try{
                String logFilePattern = loggerDir + java.io.File.separator + "jumplog%g.log";
                Handler filehndl = new java.util.logging.FileHandler(logFilePattern, JumpConstants.MAX_LOG_SIZE, JumpConstants.MAX_LOG_FILE_NUM);
                filehndl.setEncoding("UTF-8");
                filehndl.setLevel(Level.INFO);
                logger.addHandler(filehndl);
            catch(Exception e){
            logger.setLevel(Level.ALL);
            logger.setUseParentHandlers(false);
            logger.addHandler(hndl);
            logger.setLevel(Level.FINE);
            logger.info("LOGGING FACILITY IS READY !");
          private void processTask(QueueTask task){
            JumpProcessor proc = JumpProcessorGenerator.getProcessor(task);       
            if(proc==null){
                logger.severe("Unknown task type: " + task.getType());           
                return;
            proc.setJumpThread(myThread);
            proc.setLogger(logger);       
            proc.setJumpRef(this);
            task.setProcStart(new java.util.Date());
            setExecution(task, true);       
            new Thread(proc).start();       
         private void processQueue(){       
            //Endles loop for processing tasks from queue       
            QueueTask task = null;
            while(true){
                    try{
                        //null argument means: take first free, no matters which queue
                        do{
                            task = manager.getTask(activeQueues);
                            if(task!=null)
                                processTask(task);               
                        while(task!=null);
                    catch(Exception e){
                        logger.severe(e.getMessage());
                logger.fine("-------->Sleeping for " + idleSleep + " minutes...hzzzzzz (Active queues:"+ activeQueues.size()+")");
                try{
                    if(!myThread.interrupted())
                        myThread.sleep(60*1000*idleSleep);
                catch(InterruptedException e){
                    logger.fine("-------->Wakeing up !!!");
            }//while       
        public void setMyThread(Thread t){
            myThread = t;
        /** This method is only used to start Jump as a separate thread this is
         *usefull to allow jump to access its own thread to sleep wait and synchronize
         *If you just start ProcessQueue from main method it is not possible to
         *use methods like Thread.sleep becouse object is not owner of current thread.
        public void run() {
            processQueue();
        /** This is just another facade to hide database access from another classes*/
        public void updateOraTaskStatus(QueueTask task, boolean success){
            try{         
                manager.updateOraTaskStatus(task, success);
            catch(Exception e){
                logger.severe("Cannot update status of task table for task:" + task.getID() +  "\nReason: " + e.getMessage());       
        /** This is facade to JumpQueueManager method with same name to hide
         *existance of database and SQLExceptions from processor classes
         *Processor class calls this method to execute stored proc and it doesn't
         *take care about any SQL related issues including exceptions
        public void executeStoredProc(String proc) throws Exception{
            try{
                manager.executeStoredProc(proc);
            catch(Exception e){
                //logger.severe("Cannot execute stored procedure:"+ proc + "\nReason: " + e.getMessage());       
                throw e;
         *This method is only to hide QueueManager object from access from JumpProcessors
         *It handles exceptions and datbase connecting/disconnecting and is called from
         *JumpProceesor thread.
        public  void updateTaskStatus(int taskID, int status){       
            try{
                manager.updateTaskStatus(taskID, status);
            catch(Exception e){
                logger.severe("Cannot update status of task: " + taskID + " to " + status + "\nReason: " + e.getMessage());
        public java.sql.Connection getDBConnection(){
            try{
                return manager.getNewConnection();
            catch(Exception e){
                logger.severe("Cannot acquire new database connection: " + e.getMessage());
                return null;
        protected synchronized void setExecution(QueueTask task, boolean active){
            if(active){
                activeQueues.put(new Integer(task.getQueueNum()), JumpConstants.TH_STAT_BUSY);
            else{
                activeQueues.remove(new Integer(task.getQueueNum()));
        public static void main(String[] args){
                 try{
             System.out.println("The length-->"+args.length);
            System.out.println("It's " + new java.util.Date() + " now, have a good time.");
            if(args.length<5){
                System.out.println("More parameters needed:");
                System.out.println("1 - JDBC strign, 2 - DB User, 3 - DB Password, 4 - sleeping time (minutes), 5 - log file dir");
                return;
            Jump jump = new Jump(args[0], args[1], args[2], Integer.parseInt(args[3]), args[4]);
            Thread t1= new Thread(jump);
            jump.setMyThread(t1);      
            t1.start();}
                 catch(Exception e){
                      e.printStackTrace();
    } The exception i am getting is
    java.lang.NoClassDefFoundError: jdbc:oracle:thin:@localhost:1521:xe
    Exception in thread "main" ERROR: JDWP Unable to get JNI 1.2 environment, jvm->GetEnv() return code = -2
    JDWP exit error AGENT_ERROR_NO_JNI_ENV(183):  [../../../src/share/back/util.c:820] Please help me.....
    Thanks in advance.....sathya

    I am not willing to wade through the code, but this portion makes me conjecture your using an Oracle connect string instead of a class name.
    java.lang.NoClassDefFoundError: jdbc:oracle:thin:@localhost:1521:xe

  • How can I convert a Java program into a screen saver ?

    I want to write a screen saver in Java, which is to be run under Window 95 platform. However, I don't know how to convert a .class file into a .scr file ?

    A SCR File is just an renamed exe file. So what you need is an CLASS2EXE converter (there are some around) and than simply rename the file to scr.
    Dont forget the special parameters scr files have, like /s or /c for config...look up in google for those.

  • Problems calling SOAP in JAVA program

    Hello Experts,
    I'm quite new to using SOAP. I just want to ask how to call SOAP in JAVA specifically NetBean. I already created a webservice using the WSDL a created in SAP XI but problem is when I'm trying to invoke the webservice I always get error "401 Unathorized". Is there a way to specify the user name and password when calling the webservice via JAVA code?
    Error Message:
    Exception in thread "main" com.sun.xml.internal.ws.client.ClientTransportException: The server sent HTTP status code 401: Unauthorized
    Sample Code:
    public class Main {
    @param args the command line arguments
        public static void main(String[] args) throws UnsupportedEncodingException {
            ph.co.amkor.atp.ppmodule.synch.ReqCustomerNoDT Req = new ph.co.amkor.atp.ppmodule.synch.ReqCustomerNoDT();
            Req.setCompanyCode(" ");
            Req.setCustomerNumber("00110");
            RespCustDetailsDT cdwsMI = cdwsMI(Req);
            System.out.println("Customer :" + cdwsMI.getCustomerNumber());
            System.out.println("Name     :" + cdwsMI.getName());
            System.out.println("Street   :" + cdwsMI.getStreet());
            System.out.println("Coutnry  :" + cdwsMI.getCountry());
            System.out.println("City     :" + cdwsMI.getCity());
            System.out.println("MSG Type :" + cdwsMI.getMessageType());
            System.out.println("Message  :" + cdwsMI.getReturnMessage());
        private static RespCustDetailsDT cdwsMI(ph.co.amkor.atp.ppmodule.synch.ReqCustomerNoDT reqCustomerNoMT) {
            ph.co.amkor.atp.ppmodule.synch.CDWSMIService service = new ph.co.amkor.atp.ppmodule.synch.CDWSMIService();
            ph.co.amkor.atp.ppmodule.synch.CDWSMI port = service.getCDWSMIPort();
            return port.cdwsMI(reqCustomerNoMT);
    SAP Netweaver Information
    Session Information
    Application:
    Design: Integration Builder
    User:
    aafri
    Logon Language:
    Korean
    Server:
    atpxisd01_XD1_01
    Server Node:
    server0
    Runtime Environment
    Java version:
    1.4.2_12
    Java vendor:
    Sun Microsystems Inc.
    Version
    Service pack:
    12
    Release:
    NW04S_12_REL
    Latest change:
    29423
    Sync time:
    ${sync.time}
    Regards,
    Alfred

    Hello John Wu,
    Points were given.
    The code you gave me worked. Thanks! but now I'm having another error below. It seems that it did not returned anything at all cause cdwsMI object is null.
    Error:
    Exception in thread "main" java.lang.NullPointerException
            at xiwebservice.Main.main(Main.java:31)
    Java Result: 1
    Line were error happened:
    public class Main {
    @param args the command line arguments
        public static void main(String[] args) throws UnsupportedEncodingException {
            ph.co.amkor.atp.ppmodule.synch.ReqCustomerNoDT Req = new ph.co.amkor.atp.ppmodule.synch.ReqCustomerNoDT();
            Req.setCompanyCode(" ");
            Req.setCustomerNumber("00110");
            RespCustDetailsDT cdwsMI = cdwsMI(Req);
            +System.out.println("Customer :" + cdwsMI.getCustomerNumber());+
            System.out.println("Name     :" + cdwsMI.getName());
            System.out.println("Street   :" + cdwsMI.getStreet());
            System.out.println("Coutnry  :" + cdwsMI.getCountry());
            System.out.println("City     :" + cdwsMI.getCity());
            System.out.println("MSG Type :" + cdwsMI.getMessageType());
            System.out.println("Message  :" + cdwsMI.getReturnMessage());
        private static RespCustDetailsDT cdwsMI(ph.co.amkor.atp.ppmodule.synch.ReqCustomerNoDT reqCustomerNoMT) {
            ph.co.amkor.atp.ppmodule.synch.CDWSMIService service = new ph.co.amkor.atp.ppmodule.synch.CDWSMIService();
            ph.co.amkor.atp.ppmodule.synch.CDWSMI port = service.getCDWSMIPort();
            BindingProvider prov = (BindingProvider) port;
            prov.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "aafri");
            prov.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "betanew3");
            return port.cdwsMI(reqCustomerNoMT);
    Regards,
    Alfred

  • Problems converting a 2008 R2 server into a Hyper-V environment.

    Hello.
    I have a 2008 R2 Standard server running on a IBM 3650 M4 platform and I wish to convert this to a vm so that I can run this in my Hyper-V environment, but I'm running into some trouble as I do so.
    I have used the latest version of "disk2vhd.exe" to create the vhdx-file and had no problems during this procedure, but when I create a new vm and attach the disk I will not boot.  The first and only thing that appears when
    started is a blinking prompt in top left corner.
    The Hyper-V manager is running on a 2012 R2 Standard. 
    Any help would be much appreciated.

    Hello.
    I have a 2008 R2 Standard server running on a IBM 3650 M4 platform and I wish to convert this to a vm so that I can run this in my Hyper-V environment, but I'm running into some trouble as I do so.
    I have used the latest version of "disk2vhd.exe" to create the vhdx-file and had no problems during this procedure, but when I create a new vm and attach the disk I will not boot.  The first and only thing that appears when started
    is a blinking prompt in top left corner.
    The Hyper-V manager is running on a 2012 R2 Standard. 
    Any help would be much appreciated.
    You can do P2V (esp. for test & development) but for true production workload you'd better provision your VMs from scratch. If you still need that particular VM P2V'ed then make sure you re-boot in in service mode to initiate storage and network stacks
    drivers set re-build as physical and virtualized hardware are quite different. 
    StarWind VSAN [Virtual SAN] clusters Hyper-V without SAS, Fibre Channel, SMB 3.0 or iSCSI, uses Ethernet to mirror internally mounted SATA disks between hosts.

  • Problems loading IFS's java class into database

    I need store java procedures that allow connecting to ISF and managing files from external applications. The problem is when i try to load the repos.jar that contains the classes needed to work with IFS, using the command loadjava:
    loadjava -u user/pwd -v -r repos.jar
    the classes are loaded but unresolved due to error: ORA-29534. I follow the steps suggested by metalink's articles but the classes still with INVALID status in the database and i can't use this classes to develop the other classes that i need.
    Thanks for any suggest.
    FABIAN.

    The iFS Java API Classes cannot be used from with the database. This is not supported and will not work....
    If you need to access iFS functionaliy from within the database you will need to write an external java process that performs the IFS operations and communicate with that process from PL/SQL running inside the database using Advanced Queuing.

  • Problem with running a java program from the command line

    I have this code:
    package pkg;
    import jxl.*;
    import java.io.File;
    public class TestClass {
         public static void main(String[] args) {
              try{
                   Workbook book = Workbook.getWorkbook(new File("d:/testWorkspace/excFile.xls"));
                   Sheet sheet = book.getSheet(0);
                   String s=sheet.getCell(4, 2).getContents();
                   System.out.println(s);     
              }catch (Exception e){System.err.println(e);}
    }I've wrote it in Eclipse, added jxl.jar to the buildpath, and it works fine.
    Then I tried to run it from the command line and I did it like this:
    D:\testWorkspace\testProject\bin> java -cp \jxl.jar pkg.TestClassThe result was:
    Exception in thread "main" java.lang.NoClassDefFoundError: pkg/TestClass
    Caused by: java.lang.ClassNotFoundException: pkg.TestClass
    ...but the file TestClass.class DOES exist in the folder d:\testWorkspace\testProject\bin\pkg\ and the file jxl.jar IS on the root of drive D (like I already wrote, it worked fine inside the Eclipse).
    So, my question is: How to run this code from the command line?
    I have no idea what went wrong.
    Can someone help me, please?

    The current directory is not implied in the classpath.
    D:\testWorkspace\testProject\bin> java -cp .;d:\ pkg.TestClassor
    D:\testWorkspace\testProject\bin> java -cp .;d:\jxl.jar pkg.TestClassI always forget which is right since I never work with jars...

  • How to put a Java Program into the System tray

    Hi all of the forum!!
    I have a question. I want to make a monitor program but I don't know how to put the program in the system tray or just to execute the program but automatically (no manual execute), but i dont want that the program appear in a window, just start to function when i start my PC. i hope anybody help me.
    Thanks
    Best Regards
    Bucio, Francisco

    There is a plenty of similar topics here, so you can use the Search on this forum or in Google to find out.
    But shortly, you will need to use JNI or get a ready-to-use library like JNIWrapper (http://www.jniwrapper.com/winpack.jsp#tray), for example, that lets you do what you want.
    Good luck,
    EToporov

  • Convert Java program to .exe

    title says it all...is there an application that will convert your java programs into executable files?

    I'm not sure which is more tiresome: The same question asked over again (after all, this is the NtJT forum), or the increasingly silly logins that forum users feel compelled to create.
    Sometimes it's amusing. Occasionally it's necessary, in order to speak your mind on a subject without being flamed or ignored on neutral issues. But to my mind, perhaps it's time that multiple IDs were banned under forum rules, and IP addresses logged to enforce the ban (perhaps on complaint only). Especially when these extra logins are used only to abuse or ridicule members who posted reasonable (if monotonous) questions.
    Needless to say, if J-M-B is a new user, I think you've stumbled into the wrong forum. If you wish to partake of sensible discussion, ditch the login, or no-one will ever take you seriously.
    Let's keep it sensible and constructive, please.
    (IMHO only)

Maybe you are looking for

  • Upgraded to itunes 6.0.2 - now playback pauses randomly again and again

    hi, i've got an emac G4 800 with panther 10.3.9. i got the software update for itunes 6.0.2 and now the playback pauses and then starts again several times during any song. vEry annoying. please any help out there? i've already combed the threads. da

  • Conversion of ad20 non raid to a D20 raid 1 and keeping existing OS/data

    I have a new D20 with windows 7-x64 pre installed on it.  I purchased a second Lenovo supplied sata add in drive to convert the system to raid 1. When I add the  "raid 1" in support in the bios,  the system when it reboots does not recognize the exis

  • Error when creating the contract

    When i create the contract(va41) which quotes one quotation and save ,it will alert that "Customer Base Number not maintained for Payer/Soldto # 87000889" .I do not know the wrong of creating the customer or other reason.Could anyone please tell me t

  • C3 - image maps query

    Hi, I am trying to re-create a bit of our software for an interactive demo. We have an edit icon, which when clicked opens up a pre-defined list of options to choose from. I would like to re-create this and have been able to by adding a click box and

  • Using CCA Stub to Launch an Executable (For Non-Admins)

    Hi, Has anyone successfully launched a qualified\digitally signed executable using CCA Stub (When the logged User is Non-Administrator) ? I have followed all the instructions to create a signed executable using our internal CA but CCA Stub is unable