|
Hi dears
I want install bundle on apache felix framework in OSGI so first start felix and then show g! message on cmd
now when I want install bundle write this command : Install file : C:\Users\Farshad\Desktop\myJar.jar
but throws exception !! that Exception message is :
java.net.MalformedURLException: no protocol: file
java.net.MalformedURLException: no protocol: :
java.net.MalformedURLException: Unknown protocol: c
How I can do this? I use Windows 7 (64 bit) os.
thanks a lot.
|
|
|
|
|
Hello,
The correct command is
felix:install file:/path/to/bundle/bundle.jar . See this Getting Started guide.
Regards,
Prasad P. Khandekar
Knowledge exists, man only discovers it.
|
|
|
|
|
what the whole code of "Soduko" ? please answer this question
|
|
|
|
|
Rhod-Ann wrote: what the whole code of "Soduko" ?
And what is your question? Do you want to know how you can solve a sudoku in your local newspaper? - This would be the wrong forum for this.
If you want to make a Sudoku in Java, use this one[^].
Google. It really solves problems.
|
|
|
|
|
public class Solution {
public static void main(String[] args) {
Solution s = new Solution();
char[][] board = {{'.', '2', '6', '5', '.', '.', '.', '9', '.'},
{'5', '.', '.', '.', '7', '9', '.', '.', '4'},
{'3', '.', '.', '.', '1', '.', '.', '.', '.'},
{'6', '.', '.', '.', '.', '.', '8', '.', '7'},
{'.', '7', '5', '.', '2', '.', '.', '1', '.'},
{'.', '1', '.', '.', '.', '.', '4', '.', '.'},
{'.', '.', '.', '3', '.', '8', '9', '.', '2'},
{'7', '.', '.', '.', '6', '.', '.', '4', '.'},
{'.', '3', '.', '2', '.', '.', '1', '.', '.'}};
s.solver(board);
}
public boolean solver(char[][] board) {
for (int r = 0; r < board.length; r++) {
for (int c = 0; c < board[0].length; c++) {
if (board[r][c] == '.') {
for (int k = 1; k <= 9; k++) {
board[r][c] = (char) ('0' + k);
if (isValid(board, r, c) && solver(board)) {
return true;
} else {
board[r][c] = '.';
}
}
return false;
}
}
}
return true;
}
public boolean isValid(char[][] board, int r, int c) {
//check row
boolean[] row = new boolean[9];
for (int i = 0; i < 9; i++) {
if (board[r][i] >= '1' && board[r][i] <= '9') {
if (row[board[r][i] - '1'] == false) {
row[board[r][i] - '1'] = true;
} else {
return false;
}
}
}
//check column
boolean[] col = new boolean[9];
for (int i = 0; i < 9; i++) {
if (board[i][c] >= '1' && board[i][c] <= '9') {
if (col[board[i][c] - '1'] == false) {
col[board[i][c] - '1'] = true;
} else {
return false;
}
}
}
//check the 3*3 grid
boolean[] grid = new boolean[9];
for (int i = (r / 3) * 3; i < (r / 3) * 3 + 3; i++) {
for (int j = (c / 3) * 3; j < (c / 3) * 3 + 3; j++) {
if (board[i][j] >= '1' && board[i][j] <= '9') {
if (grid[board[i][j] - '1'] == false) {
grid[board[i][j] - '1'] = true;
} else {
return false;
}
}
}
}
return true;
}
}
Hi,
I think this may help to find out the solution for the problem..Plz try this and share your experience.
|
|
|
|
|
I want to create a presentation controller using openoffice impress.
I create the application that opens openoffice impress and I'm having a problem
that I want to open this .odp file in a panel in my form.
But it always opens in a new window.
How can I set parent to this impress file and can open this in my panel?
Thanks!
|
|
|
|
|
Start here[^].
Use the best guess
|
|
|
|
|
Well I have studied all these and finally succeeded to open impress document.
But the problem is quite different.
There is no control in the form or GUI.
Impress document opens in a new window or its own container.
Do you have any idea?
|
|
|
|
|
Thomas Grapel wrote: That's amazing. Not really, since it explains what your options are.
Thomas Grapel wrote: Any other Idea? No, but that site is the obvious place for help on this topic.
Use the best guess
|
|
|
|
|
Yeah thanks for your help.
I'll be connected to this forum...
|
|
|
|
|
i am using slick package
i already made my map with tiled map and now i want to use it in my project so ,
i wrote these statemnts :
map = new TiledMap("data/1.tmx");
map.render(0, 0);
but when i run it i got just the layer background
how i can display my tiles and my other layers
(i have three layeres object ,collision ,and background )
|
|
|
|
|
my project is super mario game with java
i am using package slick
i really really need help from export
please can anyone help me
|
|
|
|
|
Look, we are all volunteers and not the "We give code if we get asked for it" - section. Explain your problem, what you have tried so far and submit the code you have written until now and what the error message is or what is going wrong at all.
Then there are a lot of guy in here which are happy and pleased to help you. But no begging for code, please.
|
|
|
|
|
i was not asking for code .. believe me i am A+ student i need someone to debugg my errrores and teaches me ..becauese all the tutorials in youtube are incomplete also this is the first time i make a game and i didn't take it in my courses .. so i have to teach my self but unfortunately there is a lack of sources
|
|
|
|
|
java_beginer wrote: there is a lack of sources Did you try this[^], or this[^]?
Use the best guess
|
|
|
|
|
i was not asking for code.. so, send your code and then i will be happy to help you
|
|
|
|
|
You should be able to utilize OpenGL library for this project. No need to tell the volunteers you are A++ student to get help. What is good about being an A++ if you cannot write the code for your final year project.
|
|
|
|
|
Hi,
I have written a simple ejb application(stateless session bean) in eclipse. When iam running the client program getting the below exception on console:
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
My client program is as below:
import javax.naming.InitialContext;
import example.ExampleSessionBeanRemote;
public class Main {
public void runTest() throws Exception {
InitialContext ctx = new InitialContext();
ExampleSessionBeanRemote bean =
(ExampleSessionBeanRemote) ctx
.lookup("ejb/ExampleSessionBean");
int result = bean.multiply(3, 4);
System.out.println(result);
}
public static void main(String[] args) {
Main cli = new Main();
try {
cli.runTest();
} catch (Exception e) {
e.printStackTrace();
}
}
}
How to solve the above exception, do i need to include something in websphere, i have just include the jar file of the session bean i have written in eclipse.
Thanks.
|
|
|
|
|
Hello,
To be able to test this way, you will need an In memory JNDI server and load add bean or POJO's to the local JNDI tree. I Suggest to use EJB3Unit framework as it has all the necessary boilerplate code to this.
Regards,
Prasad P. Khandekar
Knowledge exists, man only discovers it.
|
|
|
|
|
HI All,
I have a drop down list which contains the months (Jan,Feb..Dec) and a java script calendar.when I click on calendar it should open the month selected in drop-down list as it is opposed to the current month.Can any one help me how can I do it.
|
|
|
|
|
i want to develop a project where i struck in a situation where i have to import two files with .jsp format and want to check whether that 1.jsp and 2.jsp two files are equal or not in their internal coding or it is different ?
Any idea please help
|
|
|
|