System Programming

40K

Solutions

19K

Contributors

Kernel and system programming is the process of creating the software necessary for a computer or device to function and operate other programs. Some operating systems (such as Microsoft Windows) are proprietary, but others, such as the various Linux distributions, are open source.

Share tech news, updates, or what's on your mind.

Sign up to Post

hi,

how to import ant project in eclipse. please advise

maven project is simple just say import as existing maven project under file but for Ant shows import build file but if i select that build.xml is missing and putting some weird name to project as well.

please advise
0
debugging HashMap in eclipse shows as below in variables tab for HashMap

{a=3, x=1, y=1}

instead of showing as below
{a:3, x:1, y:1}

which is right convention why eclipse shows in different convention. Does not matter as long as i see key then value separated by some special character like : or = or $ etc?
please advise
0
what is difference between below threee HashMap declarations

1.HashMap<String,Integer> map=new HashMap<String,Integer>();
2.Map<String,Integer> map=new HashMap<String,Integer>();
3.HashMap<String,int> map=new HashMap<String,int>();

why i cannot pass primitive to generics?
please advise
0
hi,

while doing maven install i got below error
No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

while doing maven clean it is success though
i follwed below steps to resolve
http://javarevisited.blogspot.com/2016/06/maven-eclipse-error-no-compiler-is-no-JRE-JDK-installed.html

how
 maven clean
maven install
maven update
are different?
why maven clean is success and no issues in doing maven update as well where as maven install complained above jre?
0
Few days back any mail related command ( mailx, mail ,mpack  ) stopped working from one sudo id .
in the logs i get error as dsn=5.6.0, stat=Data format error
but this happens with only one sudo ID-sudo1@my_hostname
another id -sudo2 works fine with any of the mail command

sudo su sudo1
mailx -s "Test mail" someone@example < /tmp/test.file
/home/sudo1/dead.letter... Saved message in /home/sudo1/dead.letter
where from=sudo1@my_hostname
message fails to sent


sudo su sudo2
mailx -s "Test mail" someone@example < /tmp/test.file
where from=sudo2@my_hostname
message successfully sent and received.

Not getting why with one prefix it is sent and other fails ... ?
0
hi,

eclipse java perspective kind of messed up as i tried to expand console which went to top right corner from bottom. I further tried to move which moved outline some where else etc. How bringing back to default view of java perspective so that i can see everything as origninal? if i restart the eclipse this problem resolved or there is any trick or command to fix this java perspective(even any other perspective for that matter like J2ee etc)
i tried restarting eclipse did not help though
please advise
0
In the html world what is difference between
<th> vs <td>

when we use each under <tr> of <table>
please advise
can i use one another interchangeably?
0
I have used Octopus Deploy but never Jenkins.

What are some big differences?

Thanks
0
A program calls some open source programs.  Can the calling program and all the open source programs be installed in the server?  The reason I ask this is because If all the programs are single threaded and a user can call the open source programs independently of the call made by the main program that runs in the server, there may be collisions.  Is there any issue I should be aware of for a situation like that?
0
Hello. I have a <asp:CheckBoxList> with 4 ListItems.  I would like to know how I can tell which if any of those checkboxes are checked.  To be more specific I would like to know if the other box is checked and if so a panel should stay visible.  So far this is what I have:

<asp:CheckBoxList ID="cblEduAssistPlans" runat="server" SelectedIndexChanged="cblEduAssistPlans_SelectedIndexChanged" AutoPostBack="true">
                       <asp:ListItem>Individualized education program (IEP)</asp:ListItem>
                       <asp:ListItem>Individualized Family Service Plan (IFSP)</asp:ListItem>
                       <asp:ListItem>504 Plan</asp:ListItem>
                       <asp:ListItem>Other</asp:ListItem>
                   </asp:CheckBoxList>

right now, when the other box is checked the panel displays (which is what I want).  But if I check on anything else it disappears.  The user should be able to check multiple boxes. But if Other is one of the checked boxes a panel should be visible. If Other is not checked or unchecked the the panel should disappear.  Here is the code that is supposed to run when other is checked.

Protected Sub cblEduAssistPlans_SelectedIndexChanged(sender As Object, e As EventArgs)
        If (cblEduAssistPlans.SelectedValue = "Other") Then
            pnlEduAssistPlans.Visible = True
        End If
    End Sub
0
Hi

Delphi 10.1 Berlin
I have written an app to monitor a folder (new files, delete files) and it does not work in some cases.
- locally it works
- if i start the application on PC1, monitor a folder on the server, add a file in that folder on PC1 it works
- if I add a file to that folder but on the server (not PC1) it does not work (but on some networks this also works!). If I have open the file explorer on PC1 I can see the added file some ms later - but my app doesn't show it.
My code
procedure TForm31.FormCreate(Sender: TObject);
var
    isf : IShellFolder;
    Eaten, attr : DWord;
    pidl : pItemIDList;
begin
  snh := TShellNotifyHandler.Create(self);
  snh.OnShellNotify := ShellNotifyHandler1;
  snh.ShellMsg := WM_User+100;
  snh.Events := [seDelete, seRenameItem, seCreate];
  snh.Recursive := true;
  SHGetDesktopFolder(isf);
  isf.ParseDisplayName(self.Handle, nil, PWideChar(ExtractFilePath(ParamStr(0))), Eaten, pidl, attr);
  label1.Caption := ExtractFilePath(ParamStr(0));
  snhHandle := snh.RegisterPIDL(self.Handle,pidl);
end;

procedure TForm31.ShellNotifyHandler1(Sender: TObject; LEvent: TShellEvent;
  pidl1, pidl2: PItemIDList);
var
    SRec: TSearchRec;
    Res : integer;
begin
  ListBox1.Clear;
  Res := FindFirst(IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0)))+'*.*', faAnyFile, SRec);
  while Res = 0 do
  begin
    if (SRec.Name <> '.') and (SRec.Name <> '..') then
      ListBox1.Items.Add(SRec.Name);
    Res := FindNext(SRec);
  end;
  

Open in new window

0
Hi,

I imported one project as existing maven project. I am seeing below error while adding tomcat 8 as runtime

An internal error occurred during: "Updating workspace".
assertion failed: Mismatched begin/endOperation


While resolving below errror by going to properties
The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

please advise
0
hi,
how to see options in advanced rest client options missing in latest version.
latest AvancedRestClient Launched From StartMenu looks quite different as attached.
i am not able to see actual response as well but just able to see response header alone

please advise
AdvanceRestClientOptions.png
latestAvancedRestClientLaunchedFromS.png
latestAvancedRestClientLaunchedFromS.png
0
hi,

when i  try to missing junit to build path showing 2 options. i wonder why it shows same option 2 times. please advise
JUNitBuildPAth.png
0
while opening team explored in eclipse mars getting below error

Plug-in "com.microsoft.tfs.client.common.ui" was unable to instantiate class "com.microsoft.tfs.client.common.ui.views.TeamExplorerView".


how to resolve this.

Please advise
0
Hi,

i wrote my web application with web.xml as below

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns="http://xmlns.jcp.org/xml/ns/javaee"
	xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
	id="WebApp_ID" version="3.1">
<welcome-file-list>
    <welcome-file>simple.jsp</welcome-file>
</welcome-file-list>
	<security-constraint>
		<web-resource-collection>
			<web-resource-name>MyResources</web-resource-name>
			<url-pattern>/*</url-pattern>
		</web-resource-collection>
		<auth-constraint>
			<role-name>myuserrole</role-name>
		</auth-constraint>
	</security-constraint>
	<login-config>
		<auth-method>BASIC</auth-method>
		<realm-name>FILE</realm-name>
	<!-- 	<form-login-config>
			<form-login-page>/login.jsp</form-login-page>
			<form-error-page>/error.jsp</form-error-page>
		</form-login-config> -->
	</login-config>
</web-app>

Open in new window


i added role and username and password to tomcat-users.xml as below

<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the 

Open in new window

0
I got below error
The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
i checked below which has tomcat 8 already.

Project → Properties → Target Runtimes → *Apache Tomcat worked for me. There is no Target Runtimes under Facets (I'm on Eclipse v4.4 (Luna)).

i just has to remove and add again to  resolve this error.

i wonder why i have to remove and re add to resolve. this does not make sense to me. please advise
0
hi,

I am trying below example

http://briansjavablog.blogspot.com/2012/09/spring-jms-tutorial-with-activemq.html

i fired 100 messages as decribed in tutorial and exepcted them to be consumed with message on console.

Intead i am gettign below error


SEVERE: Could not refresh JMS Connection for destination 'jmsReceiveJndi' - retrying using FixedBackOff{interval=5000, currentAttempts=21, maxAttempts=unlimited}. Cause: Cannot send, channel has already failed: tcp://127.0.0.1:8161

under meta-inf context.xml is as below

<?xml version="1.0" encoding="UTF-8"?>
<Context>

   <!--
               Active MQ Connection Factory manages pooled connections
               to the ActiveMQ broker. Tomcat will connect with the
               broker using a TCP connection on port 61616 - this is the
               default port for ActiveMQ
   -->
   <Resource name="jms/mqConnectionFactory"
                     auth="Container"
                     type="org.apache.activemq.ActiveMQConnectionFactory"
                     description="JMS Connection Factory"
               factory="org.apache.activemq.jndi.JNDIReferenceFactory"
               brokerURL="tcp://localhost:8161" />

   <!--
               This is a reference to the first Queue we defined
               earlier in the ActiveMQ admin console
   -->
   <Resource name="jms/testQueueOne"
                     auth="Container"
                     type="org.apache.activemq.command.ActiveMQQueue"
               factory="org.apache.activemq.jndi.JNDIReferenceFactory"
               physicalName="TestQueueOne"/>

   <!--
               This is a reference to …
0
while trying below example

i did all stepas given
http://www.javanbeyond.com/activemq/tomcat-spring-activemq/

when i execute i do not see 3 mesages there

Example Execution:

Start ActiveMQ and login as admin/admin and click on “Queues” tab.
Start Tomcat and deploy the application. You should see three listeners listening to “firstQueue”.

what is difference between
 tcp://127.x.y.z:8161
 tcp://localhost:8161
 http://localhost:8161

which one i have to use.

my active mq running on my own windows laptop locally?
when to use http wen to use ftp?
when to use local host when to use ip like number 127.x.y.z...
please advise
0
hi,

I am looking for good sample example on below area
JMS API Durable subscriber example
can you please point me to some end to end example on this using active mq.

Please advise
0
hi,

can i open two instances of eclipse mars both pointing to same tomcat 8 pointing ?
is that is ok or do i get any error like port conflict or something else?
please advise
0
hi,

within eclipse i have tomcat 8 running. I want to know what location that tomcat running from on my local windows laptop C drive as i happened to have many tomcats in my c drive under different directories
0
hi am geting this error after running the antivirus am not even able to start my pc in safe mode mode am in window 10 The application was unable to start correctly 0xc0000005 am in window 10
0
Hi,
i am working on below example
https://howtodoinjava.com/jms/jms-publish-subscribe-message-example/

i wrote my publisher as below

package pubSub;    
 
import javax.naming.Context;
import javax.naming.InitialContext;                                                                          
import javax.jms.Topic;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.jms.TopicPublisher;

import java.util.Properties;

import javax.jms.DeliveryMode;
import javax.jms.TopicSession;
import javax.jms.TopicConnection;
import javax.jms.TopicConnectionFactory;
                                                                            
public class Publisher
{
    public static void main(String[] args) throws Exception
    {
    	// Obtain a JNDI connection
    	Properties env = new Properties();
    	env.put(Context.INITIAL_CONTEXT_FACTORY,“org.apache.activemq.jndi.ActiveMQInitialContextFactory”);
    	env.put(Context.PROVIDER_URL, “http://localhost:8161”);
    	//env.put(Context.SECURITY_PRINCIPAL, “weblogic”);
    	//env.put(Context.SECURITY_CREDENTIALS, “weblogic”);

    	InitialContext ctx = new InitialContext(env);
       // get the initial context
       InitialContext ctx = new InitialContext();
                                                                           
       // lookup the topic object
       Topic topic = (Topic) ctx.lookup("topic/topic0");
                                                                           
       // 

Open in new window

0
hi,
my project has different environment related property files like int, sT, PT, Prod etc to call various service (like email service, validate service etc)

using maven build command from command prompt or eclipse how to pass environment like integraion for example


pom.xml has filter entry i heard which does check like this
any good links, examples on this
please advise
0

System Programming

40K

Solutions

19K

Contributors

Kernel and system programming is the process of creating the software necessary for a computer or device to function and operate other programs. Some operating systems (such as Microsoft Windows) are proprietary, but others, such as the various Linux distributions, are open source.

Top Experts In
System Programming
<
Monthly
>